help-octave
[Top][All Lists]
Advanced

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

Simple question regarding plotting in for loops


From: Henriamaa
Subject: Simple question regarding plotting in for loops
Date: Wed, 20 Feb 2013 19:20:06 -0800 (PST)

When I write a function for plotting this way:
function test
for i =1:10;
h = sin (i);
plot(h)
endfor

it does not plot anything but when I do this:
function test
 i =1:10;
h = sin (i);
plot(h)
it plots the points.

This is a general pattern. I have been able to draw a circle without the for
loop but once I put the plot statement in the for loop nothing is plotted.
What am I doing wrong? 



--
View this message in context: 
http://octave.1599824.n4.nabble.com/Simple-question-regarding-plotting-in-for-loops-tp4650092.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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