Operation with units: f is not defined

Operation with units: f is not defined - Сообщения

#1 Опубликовано: 24.06.2016 19:13:55
Basile

Basile

8 сообщений из 172 понравились пользователям.

Группа: User

Hello,
I am getting the following:
smath error 35.JPG
Basile
#2 Опубликовано: 24.06.2016 21:39:49
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 сообщений из 1674 понравились пользователям.

Группа: User

Hi Basile.

That's is the expected way to work with smath.

To get the value of X.C you must to call the function after defining X.C with X.C(f)=

Best regards.

Alvaro.
#3 Опубликовано: 24.06.2016 22:34:38
Basile

Basile

8 сообщений из 172 понравились пользователям.

Группа: User

Alvaro,
Look to the left the of X.C , the X.L
Should behave the same?

Basile
#4 Опубликовано: 24.06.2016 23:02:38
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 сообщений из 1674 понравились пользователям.

Группа: User

Wrote

Alvaro,
Look to the left the of X.C , the X.L
Should behave the same?

Basile



Depending which version, it could be. I guess that must to be an election from author, this is, if eval functions in that way. The "not evaluation" option, as the attached picture, it's ok for me.

Best regards.
XLXC.gif
Alvaro.

#5 Опубликовано: 24.06.2016 23:13:38
Basile

Basile

8 сообщений из 172 понравились пользователям.

Группа: User

i am using
smath error 38.JPG
Basile
#6 Опубликовано: 25.06.2016 00:46:19
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Same problem as before: you have no circuit, then no LC project.
The only thing you can do is calculate the resonance frequency: 'fo'
Then plot it as sin(fo)
#7 Опубликовано: 25.06.2016 09:41:27
Basile

Basile

8 сообщений из 172 понравились пользователям.

Группа: User

Jean,

I am calculating the reactance of the inductor and the capacitor at a frequency f.

Basile
#8 Опубликовано: 25.06.2016 13:53:44
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

In my times, pure L, C were strictly imaginary. Just by themselves they don't have much use
whereas there is no such thing as pure L , pure C. They both have physical resistiviy.
#9 Опубликовано: 25.06.2016 18:30:56
Basile

Basile

8 сообщений из 172 понравились пользователям.

Группа: User

Jean,

You are right that:
X.L=jωL
and
X.C=-j(1/ωC)
and the magnitude is that I calculate.

You can simply consider ideal elements without the loss resistance.

Basile
#10 Опубликовано: 25.06.2016 21:51:28
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 сообщений из 1674 понравились пользователям.

Группа: User

Hi Basile. That's isn't.

Correct XL and XC (reactances) are without j, as in your worksheets.

ZL and ZC (impedances) are with j.

Actually the total impedance is Z = R + jX, where X = XL + XC is the total reactance.

Best regards.

Alvaro.
#11 Опубликовано: 26.06.2016 00:35:47
Basile

Basile

8 сообщений из 172 понравились пользователям.

Группа: User

Alvaro,

You are confusing things.
What you say are correct but have to do nothing to do with the question.
X.L, X.C are reactance (with j or without j)

Z is impedance of R and X.

Basile
#12 Опубликовано: 26.06.2016 01:03:00
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 сообщений из 1674 понравились пользователям.

Группа: User

Wrote

Alvaro,

You are confusing things.
What you say are correct but have to do nothing to do with the question.
X.L, X.C are reactance (with j or without j)

Z is impedance of R and X.

Basile



Hi Basile. I don't confusing. Reactances ( https://en.wikipedia.org/wiki/Electrical_reactance ) are reals and impedances ( https://en.wikipedia.org/wiki/Electrical_impedance ) are complexes. So X.L, X.C can't have j.

About the numerical evaluation for a function, check this old post: http://en.smath.info/forum/yaf_postst640_Function-as-a-program.aspx

In X.L, X.C definitions as functions, f must to be a local variable. X.L(f) -> (symb evaluation) must to set the answer with "f", not with "100 Hz". And the numerical evaluation X.L(f) = must to be in red, as f as local variable isn't defined.

As a choice of the program writer, and what you can see in the last post of the above referenced, you can set all the local variables as globals with f(x) = 1*(line ... ). Actually I'm not comfortable with that behavoir, but is the choice of Andrei.

Best regards.

Alvaro.
#13 Опубликовано: 26.06.2016 02:01:29
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Just like this Basile, for a family of "C's"
at a fixed frequency 8 the magenta line.
On the plot, 'f' => 'x'.

Forum Basile Rc.gif
#14 Опубликовано: 26.06.2016 14:59:10
Basile

Basile

8 сообщений из 172 понравились пользователям.

Группа: User

Jean,
Yes, I can plot X.C(f) and X.L(f) but if I try to plot the difference or take the aritmetic difference does not work.
Please see figure and figure in post #1 on top, if it helps.
smath error 39.JPG
Basile
#15 Опубликовано: 26.06.2016 19:42:21
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Basile, let's make it clear on three points:

1. You have no work sheet, then there is no project [no help].
2. Read this link again https://en.wikipedia.org/wiki/LC_circuit
to help you start onstruct a project.
3. Those gyzmas: they do nothing circuit wise.

Jean

Forum Basile NO Project.gif
#16 Опубликовано: 27.06.2016 00:00:18
Basile

Basile

8 сообщений из 172 понравились пользователям.

Группа: User

Jean,
Attached please find the file.
test resonance.sm (7 КиБ) скачан 49 раз(а).
Basile
#17 Опубликовано: 27.06.2016 10:15:28
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

... project done Basile.

Jean

Circuit [LC].sm (18 КиБ) скачан 40 раз(а).
#18 Опубликовано: 27.06.2016 10:17:47
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Note that I have removed the unit system because
"Units don't match" error mesage ... so: zap !
#19 Опубликовано: 27.06.2016 11:03:08
Basile

Basile

8 сообщений из 172 понравились пользователям.

Группа: User

Jean,

"why units do not match? Are they both Ω?"

Basile
PS: Thank you for the discussion.
#20 Опубликовано: 27.06.2016 13:54:29
CBG

CBG

77 сообщений из 312 понравились пользователям.

Группа: User

Redefining subtraction or function.



Test_resonance.png


Best Regards

Carlos

test resonance_CBG.sm (10 КиБ) скачан 36 раз(а).
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений