matlab to simulink model

2 次查看(过去 30 天)
Ahsan
Ahsan 2014-1-5
评论: Ahsan 2014-1-5
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 个评论
Azzi Abdelmalek
Azzi Abdelmalek 2014-1-5
t=(0:1000)/1000*10*pi;
This looks like a signal rather than a model
Ahsan
Ahsan 2014-1-5
then how to generate this signal to feed Sin and Cos to build a circle.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Simulink Functions 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by