help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

plotting mulitple variables vs y


From: Kirk
Subject: plotting mulitple variables vs y
Date: Tue, 23 Apr 2013 09:01:01 -0700 (PDT)

I am trying to plot 2 variables in an equation against the y value but it does not seem to be doing that for me in Octave.
my small example I came up with is this code below

z=0.1;
for x1 = 1:0.5:2
for x2 = 0:0.1:1.5

y = sqrt(x1+x2^2)+z;
hold on;
plot(y,x2);
end
hold off;
end


I don't know if there is an easier way or if my syntax is wrong but i get a plot but with no value points or a line connecting them.
Kirk


reply via email to

[Prev in Thread] Current Thread [Next in Thread]