parametric2d.m
来自「parametric 2d using matlab, parametric 2」· M 代码 · 共 22 行
M
22 行
% parametric2D.m
% A program to explore parameteric forms of lines in 2D
clear all;
close all;
x0 = [0 0]'; % initial position
x1 = [1 0]'; % initial velocity
x2 = [0 1]'; % initial acceleration
x3 = [0 -0.11]'; % initial rate of change of acceleration
%x3 = [-0.007 0]'; % uncomment the line
s = -3:0.5:10; % pretend s is a time parameter
% compute a set of points
p = repmat(x0,1,length(s)) + x1*s + x2*(s.^2) + x3*(s.^3);
% draw the points, and their connecting lines
figure;
axis equal;
plot( p(1,:), p(2,:), 'ko', p(1,:), p(2,:), 'k-' );
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?