cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

These units are not compatible

rdliquid
12-Amethyst

These units are not compatible

Please help. I am not sure why it is complaining about the units. Both numerator and denominator are in Ohms

zd1(s) ---> Ohms (numerator)

s*L1 ---> Ohms (denominator)

ACCEPTED SOLUTION

Accepted Solutions
rdliquid
12-Amethyst
(To:Werner_E)

Hi

 

Thanks for all the helps. Not use to vectorize a function yet but will do it from now on

 

Rdliquid

View solution in original post

6 REPLIES 6
Werner_E
25-Diamond I
(To:rdliquid)

Either delete the equal sign at the end or delete the "(s)" after T

 

You have to decide if you want define a function T() (no "=" at the end!) or if you want to define a variable T

This is an old mistake, or rather a flaw.
Once upon a time, the developers of Mathcad created the tandem-operator ... := ... = ..., but forgot to attach it not only to variables, but also to functions. And the error messege is not correct.

tandem.png

HI

 

Thanks a lot for all your helps. I deleted the "=" at the T(s) expression and it is now working. Unfortunately I have one more question, may not related to the original question.

 

I defined D(s):=|T(s)| and vectorized on top of the |T(s)|, then I evaluated the D(s) expression and it seems correct.

 

However, when I try: MAG_T(s):=[(Re(T(s))^2+(Im(T(s))^2]^0.5 returns values around 10^-54 which is a very low number and its results do not match with D(s):=|T(s)| vectorized which returns around 0.06 or so

Do you know why?

 

Please see attached file

 

Thanks for your helps again

rdliquid

ReIm.png

Werner_E
25-Diamond I
(To:rdliquid)

However, when I try: MAG_T(s):=[(Re(T(s))^2+(Im(T(s))^2]^0.5 returns values around 10^-54 which is a very low number and its results do not match with D(s):=|T(s)| vectorized which returns around 0.06 or so

Do you know why?


Yes, I do.

Valery already showed the solution - you have to vectorize the expression.

The reason is the difference between T(s) and T(s) vectorized

Werner_E_0-1599943435962.png

Why the difference? Because of functions like z.d1(s). They include z1(s)*s. z1(s) returns a vector and s is a vector. So without multiplication vectorization you get the vector product. This is not what you want - you want to feed every single element of s in your function and collect the scalar results in a vector. And this is exactly what vectorization is good for.

 

rdliquid
12-Amethyst
(To:Werner_E)

Hi

 

Thanks for all the helps. Not use to vectorize a function yet but will do it from now on

 

Rdliquid

Announcements

Top Tags