matlab to simulink model
2 views (last 30 days)
Show older comments
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
on 5 Jan 2014
t=(0:1000)/1000*10*pi;
This looks like a signal rather than a model
Answers (0)
See Also
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!