p10_18.m
来自「Advanced Engineering Mathematics using M」· M 代码 · 共 30 行
M
30 行
% P10_18.M Compute and plot the vector position% of a submarinet=(0:0.1:3)';R=[t.^2+t+2 t.^3-t];%% Plot R columns vs indexfigureplot(R)title('Submarine Path x,y vs time index')gridfprintf('Strike a key for next plot\n')pause% Plot x, y vs. timefigureplot(t,R(:,1),':',t,R(:,2),'+')title('Submarine Path 0 to 3 time units')xlabel('Time units')ylabel('Distance in x (--) and y (++)')gridfprintf('Strike a key for next plot\n')pause% Plot x vs yfigureplot(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 + =
减小字号Ctrl + -
显示快捷键?