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

These units are not compatible

SOLVED
rdliquid
Granite

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)

1 ACCEPTED SOLUTION

Accepted Solutions

Re: These units are not compatible

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

Re: These units are not compatible

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

Re: These units are not compatible

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

Re: These units are not compatible

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

Re: These units are not compatible

ReIm.png

Re: These units are not compatible

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.

 

Re: These units are not compatible

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

Announcements
Check out the latest
Mathcad Tip
"PTC Mathcad 15 / Prime 1-6 Update."