matlab to simulink model
2 次查看(过去 30 天)
显示 更早的评论
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
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!