Clear Filters
Clear Filters

when dealing with a circle how do you connect the last point with the first point

1 view (last 30 days)
for i=1:60
j(i)=i+1
k(i)=i-1
if k(i)=0
k(i)=60
end
if j(i)=61
j(i)=1
end
Am(i)=((b*t)/6)*(2+(D(j(i))/D(i)));
An(i)=((b*t)/6)*(2+(D(k(i))/D(i)));
Ae(i)=Am(i)+An(i)+Al;
end
Error: File: WebStringer.m Line: 4 Column: 11
The expression to the left of the equals sign is not a valid target for an assignment.

Answers (1)

Image Analyst
Image Analyst on 24 Feb 2018
Edited: Image Analyst on 24 Feb 2018
I'm not seeing how that has anything to do with a circle. To create a circle, see the FAQ: http://matlab.wikia.com/wiki/FAQ#How_do_I_create_a_circle.3F
To close or connect an array, tack the first point onto the last point:
x(end+1) = x(1);
y(end+1) = y(1);

Categories

Find more on Graphics Performance in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!