This preview shows page 1. Sign up to view the full content.
Unformatted text preview: end elseif sv<0 %this elseif statement accounts for negative step increments vec=iv; %vec must equal iv in order to get the initial value z=sv; %z must equal sv in order to prevent the loop form going one step too %far while (fv-z)<iv %this condition will make sure that my final value minus the %negative increment is less than the initial value while %continuously adding (subtracting) the step value to the initial %value iv = iv + sv; vec = [vec iv]; %this sets vec equal to whatever the new initial value is end elseif sv==0 %this elseif statement accounts for zero step increments vec=; %the resulting vector will be empty, because no steps are taken end...
View Full Document
This note was uploaded on 10/21/2010 for the course CS 1371 taught by Professor Stallworth during the Spring '08 term at Georgia Institute of Technology.
- Spring '08