⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 p12_19.m

📁 Programs for the book Advanced Engineering Mathematics using MATLAB, 2ndEd.
💻 M
字号:
% P12_19.M Compute and plot the vector position
%  of a submarine
t=(0:0.1:3)';
R=[t.^2+t+2 t.^3-t];
%
% Plot R columns vs index
figure
plot(R)
title('Submarine Path x,y vs time index')
grid
fprintf('Strike a key for next plot\n')
pause
% Plot x, y vs. time
figure
plot(t,R(:,1),':',t,R(:,2),'+')
title('Submarine Path 0 to 3 time units')
xlabel('Time units')
ylabel('Distance in x (--) and y (++)')
grid
fprintf('Strike a key for next plot\n')
pause
% Plot x vs y
figure
plot(R(:,1),R(:,2))
title('Submarine Path 0 to 3 time units')
xlabel('Distance in x')
ylabel('Distance in y')
grid

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -