Creating a surface plot with nested loops in MATLAB

Join the discussion
Registration is free. Start your own thread to ask a follow-up.
2 replies · 3K views
physicsCU
Messages
198
Reaction score
1
Hey guys,

Is there anyone good with MATLAB for loops? I am having trouble with getting an embedded loop within another loop to work.

I am trying to vary two parameters and create a surface plot with a third variable as the dependent.

What I really need help with is how to get the LHS of my statements correct. I will post my code later tonight, its on another computer, but if anyone has a good site to help me out in the mean time, that would be great.

Thanks!
 
Physics news on Phys.org
Its not an error perse, its just that i get a line in 3d space, when i should be getting a surface plot, because two variables are being varied at all points.