Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #2206 > unrolled thread
| Started by | Arda Akalın <arda1404@gmail.com> |
|---|---|
| First post | 2011-05-08 11:36 +0000 |
| Last post | 2011-05-09 10:19 +0000 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
mathematica help please Arda Akalın <arda1404@gmail.com> - 2011-05-08 11:36 +0000
Re: mathematica help please David Bailey <dave@removedbailey.co.uk> - 2011-05-09 10:18 +0000
Re: mathematica help please Alois Steindl <Alois.Steindl@tuwien.ac.at> - 2011-05-09 10:19 +0000
| From | Arda Akalın <arda1404@gmail.com> |
|---|---|
| Date | 2011-05-08 11:36 +0000 |
| Subject | mathematica help please |
| Message-ID | <iq5v8n$pjj$1@smc.vnet.net> |
z = 0.08303 + I 0.4709
y = I 4.782
IR = 400
VR = 154000/Sqrt[3]
VS[l_] := ((l + (z*y)/2)*VR) + z*IR
IS[l_] := ((l + (z*y)/4)*y*VR) + ((l + (z*y)/2)*IR)
Plot[Sqrt[3]*Abs[VS[l]], {l, 0, 1100}]
Plot[Abs[IS[l]], {l, 0, 1100}]
S[l_] := 3*VS[l]*Conjugate[IS[l]]
Plot[Abs[S[l]], {l, 0, 1100}]
i write this code but it gives this error SetDelayed::write: Tag Integer in 400[l_] is Protected. >>
help me pleasee
[toc] | [next] | [standalone]
| From | David Bailey <dave@removedbailey.co.uk> |
|---|---|
| Date | 2011-05-09 10:18 +0000 |
| Message-ID | <iq8f2a$5rj$1@smc.vnet.net> |
| In reply to | #2206 |
On 08/05/2011 12:36, Arda Akal=C4=B1n wrote:
> z = 0.08303 + I 0.4709
> y = I 4.782
> IR = 400
> VR = 154000/Sqrt[3]
> VS[l_] := ((l + (z*y)/2)*VR) + z*IR
> IS[l_] := ((l + (z*y)/4)*y*VR) + ((l + (z*y)/2)*IR)
> Plot[Sqrt[3]*Abs[VS[l]], {l, 0, 1100}]
> Plot[Abs[IS[l]], {l, 0, 1100}]
> S[l_] := 3*VS[l]*Conjugate[IS[l]]
> Plot[Abs[S[l]], {l, 0, 1100}]
>
Hmmm - when I paste that into Mathematica, it works, and generates some
plots!
My guess is that your code was actually embedded in a larger context,
such as inside a function. In that case, each of those lines should be
terminated with a semicolon (;).
In general it is better to avoid using variables with names that start
with a capital letter, as these are reserved for possible use in future
versions of Mathematica.
David Bailey
http://www.dbaileyconsultancy.co.uk
[toc] | [prev] | [next] | [standalone]
| From | Alois Steindl <Alois.Steindl@tuwien.ac.at> |
|---|---|
| Date | 2011-05-09 10:19 +0000 |
| Message-ID | <iq8f41$5tc$1@smc.vnet.net> |
| In reply to | #2206 |
Am 08.05.2011 13:36, schrieb Arda Akalın:
> z = 0.08303 + I 0.4709
> y = I 4.782
> IR = 400
> VR = 154000/Sqrt[3]
> VS[l_] := ((l + (z*y)/2)*VR) + z*IR
> IS[l_] := ((l + (z*y)/4)*y*VR) + ((l + (z*y)/2)*IR)
> Plot[Sqrt[3]*Abs[VS[l]], {l, 0, 1100}]
> Plot[Abs[IS[l]], {l, 0, 1100}]
> S[l_] := 3*VS[l]*Conjugate[IS[l]]
> Plot[Abs[S[l]], {l, 0, 1100}]
Hello,
I tried your example here, but didn't see the error, that you mentioned.
It seems, that you have assigned the value 400 to some variable, that
you use as function in this code snippet.
Try your example from scratch and it should work.
Alois
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web