matlab to simulink model

1 view (last 30 days)
Ahsan
Ahsan on 5 Jan 2014
Commented: Ahsan on 5 Jan 2014
how to build the following Matlab code to simulink model with appropriate angle and equation system.
t=(0:1000)/1000*10*pi;
x = (t).*sin(t);
y = (t).*cos(t);
z = t;
and the complete model required:
t=(0:1000)/1000*10*pi;
x = (t).*sin(t);
y = (t).*cos(t);
z = t;
plot3(x,y,z,'c') ;
h=line('Color',[1 0 0],'Marker','.','MarkerSize',40,'EraseMode','xor');
n=length(x);
i=1;
while n
set(h,'xdata',x(i),'ydata',y(i),'zdata',z(i));
drawnow;
pause(0.0005)
i=i+1;
end
  4 Comments
Azzi Abdelmalek
Azzi Abdelmalek on 5 Jan 2014
t=(0:1000)/1000*10*pi;
This looks like a signal rather than a model
Ahsan
Ahsan on 5 Jan 2014
then how to generate this signal to feed Sin and Cos to build a circle.

Sign in to comment.

Answers (0)

Categories

Find more on Simulink Functions 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!