hi everyone, I have a problem with a gnuplot script. I d like to plot a function called sin(z) where z = x+i*y is the generic complex number.
I attached the script file and any help would be great.
thank you
Your multi-step construction of your own sinz function is completely unnecessary. gnuplot's builtin sin() function already supports complex arguments just fine.
You failed to tell us what problem you have. I'll venture a guess that you didn't get any output, or just a message like "all points undefined". That's because the value you're plotting is complex, and complex values can't really be plotted. You have to decide on a way of extracting a real value from the complex result.
The plotting command could be as simple as
splot real(sin(x+{0,1}*z)) w pm3d
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
thank you very much for your help, yes the problem was I wasn t get any output.
now I understand why, I need just to spend a bit more time to think, anyway the link was very helpfull.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi everyone, I have a problem with a gnuplot script. I d like to plot a function called sin(z) where z = x+i*y is the generic complex number.
I attached the script file and any help would be great.
thank you
Your multi-step construction of your own sinz function is completely unnecessary. gnuplot's builtin sin() function already supports complex arguments just fine.
You failed to tell us what problem you have. I'll venture a guess that you didn't get any output, or just a message like "all points undefined". That's because the value you're plotting is complex, and complex values can't really be plotted. You have to decide on a way of extracting a real value from the complex result.
The plotting command could be as simple as
Possibly the online demos for complex trig can provide guidance
http://gnuplot.sourceforge.net/demo_5.2/complex_trig.html
thank you very much for your help, yes the problem was I wasn t get any output.
now I understand why, I need just to spend a bit more time to think, anyway the link was very helpfull.