how can i write this in matlab ?
Info
This question is closed. Reopen it to edit or answer.
Show older comments
for i=x:-1:Q;
z=i-1;
A0=pi*(i/2)^2;
A1=pi*(z/2)^2;
Y=ln(A0/A1);
Fn=A0 . ( Y(n-1)+Y(n))
plot(i,F)
Answers (1)
John D'Errico
on 29 Dec 2016
Edited: John D'Errico
on 29 Dec 2016
You already did write it. WTP?
for i=x:-1:Q
z=i-1;
A0=pi*(i/2)^2;
Ai=pi*(z/2)^2;
end
I added an end, and removed spurious semicolon. It does not do anything interesting. And the loop overwrites those variables, so odds are you really did not want to use a loop. But how can we know what you really wanted to do, only seeing what you did do not terribly well?
1 Comment
student 1727
on 29 Dec 2016
Edited: student 1727
on 29 Dec 2016
This question is closed.
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!