- #1
jhnreid86
- 1
- 0
Homework Statement
I am trying to plot simply a quarter of a circle but am having difficulty with it.
Homework Equations
The Attempt at a Solution
So far I have
x = 0:0.01:1;
for i = 0:length(x)
y = sqrt(1 - x(i)^2);
plot(x,y,'b-')
end
Basically what I am trying to do here is create a vector x with values from 0 to 1, and then plot each corresponding y coordinate.
I keep getting the following error
? Attempted to access x(0); index must be a positive integer or logical.
Error in ==> Untitled5 at 5
y = sqrt(1 - x(i)^2);
Any help would be greatly appreciated!