Lectures 6 - 11 Flashcards
What is the generic code for an unconditional loop?
for loopvarname=m:s:n
statements
end
What is another name for unconditional loops?
For loops
What is another name for conditional loops?
while loops
What is the generic code for while loops
while (logical expressions)
statements
end
What are the criteria for while loops
logical expression must have a defined variable prior to the while statement
it must be updated with each iteration
What creates a 3D plot?
surf(x,y,z)
2D logarithmic x linear y
semilogx(x,y)
2D logarithmic y linear x
semilogy(x,y)
2D logarithmic x and y
loglog(x,y)
2D polar plot of theta and r
polar(th,r)
axis square
makes the plot area square
axis equal
sets the plot area with proportional axes (equal unit lengths)
axis normal
returns axes to default settings
grid on/grid off
turns on and of griddlines
hold on/hold off
freezes contents of plot area for adding other data series (lets you plot multiple data series on same figure)