Dear All,
I have a code for a complex polynomial equation which I'm trying to plot solving its real and imaginary parts separately. While I try to plot it gives me a blank plot. I need your valuable advice which can help me immensely in solving the same.
Please advice me.
The code is as attached herewith.
rgds
Yes, I have tried it, but it is not working, it hides the vertical scale.
I want to write it as I have shown above, but how should it be the syntax I'm not getting.
You asked the same question about a year ago here and I provided a solution. Have you tried it for this example?
Hi, Say for example, my scale in vertical axis reads
y = 2x10^-29, 4x10^-29, 6x10^-29 ......
I can rescale the vertical axis as
y=yx10^-30 which will look my scale as y=0.2, 0.4, 0.6 ..............
Also, if I change the input parameters the plot does not show any change whatsoever. Can you please tell why it is not showing any change if input parameters are varied?
What do you mean by
I want my scale to 1 place after decimal.
Provide a specific example.
Hi,
Now it is plotting for both the real and imaginary.
How can I want to rescale the vertical axis? I want my scale to 1 place after decimal.
Remove the last semicolon in your code. It suppresses the output.
The above code is not plotting. It runs but does not plot anything.
Actually I want to plot
(a) x1 versus k (b) y1 versus k
When you write x1=... and y1=..., they become definitions, not equations. Is this what you meant?
x1=...
y1=...
eqs = {x1 == (-p11*(1/xi + I k) - p44*(1/xi + I k)*(I k - 1/xi) + p66*(1/xi^2 + k^2) + y1*(q22*(1/xi + I k) - q33*(1/xi + I k) (I k - 1/xi) - q44*(1/xi^2 + k^2) - q55*(1/xi - I k)))/(p22 + p33*(I k - 1/xi) - p55*(1/xi^2 + k^2)), y1 == (-q11*(1/xi - I k) - x1*(q22*(1/xi + I k) - q33*(1/xi + I k)*(I k - 1/xi) - q44*(1/xi^2 + k^2) - q55*(1/xi - I k)))/(p22 + p33*(I k - 1/xi) - p55*(1/xi^2 + k^2))}; {x1sol, y1sol} = {x1, y1} /. First@Solve[eqs, {x1, y1}]; Block[{y = 1}, Plot[{Im[y1sol] /. {xi -> 1}, Im[y1sol] /. xi -> 3, Im[y1sol] /. xi -> 5}, {k, 0, 10}]]
I get reasonable plots this way:
Plot[{Im[y1] /. {xi -> 1, y -> 1}, Im[y1] /. {xi -> 3, y -> 1}, Im[y1] /. {xi -> 5, y -> 1}}, {k, 0, 10}] Plot[{Re[x1] /. {xi -> 1, y -> 1}, Re[x1] /. {xi -> 3, y -> 1}, Re[x1] /. {xi -> 5, y -> 1}}, {k, 0, 10}]
I also used the syntax as you have mentioned.
But here I'm getting the "$RecursionLimit::reclim: Recursion depth of 1024 exceeded."
Hence if someone can provide me valuable advice as how to correct this error will be helpful for me.
You forgot to give a numeric value to the variable y.
y
I have done it now. It is still not plotting. The equations for x1 and y1 are coupled equations.