Undefined function error using initial command
1 次查看(过去 30 天)
显示 更早的评论
Every time I use the "initial" command on MATLAB (which I am required to use by my professor) I keep getting an error: Undefined function 'initial' for input arguments of type 'double'. What is causing this? From collaboration with other class mates I don't seem to have an error in my code.
clear all; close all; clc;
t=0:0.01:20;
A=[0 1 0 0;-2 -1 1 0; 0 0 0 1; 1 0 -1 -1];
B=[0 0 0 0]';
C=[0 1 0 0; 0 0 1 0];
D=[0;0];
q0 = [ 0 0 1 0];
[y,x,t]=initial(A,B,C,D,q0,t);
Y1= [1 0]*y';
Y2= [0 1]*y';
figure ( 1 )
plot ( t, Y1, 'k-', 'LineWidth', 2 )
set ( gca, 'FontSize', 16, 'FontName', 'Times New Roman' )
xlabel ( 'Time (s)' )
ylabel ( 'V_1(t) (m/s)' )
figure ( 2 )
plot ( t, Y2, 'k-', 'LineWidth', 2 )
set ( gca, 'FontSize', 16, 'FontName', 'Times New Roman' )
xlabel ( 'Time (s)' )
ylabel ( 'X_2(t)' )
0 个评论
回答(1 个)
Image Analyst
2015-2-3
It's not finding the "initial.m" file on your search path. Get your professor's "initial.m" file and put it into the folder where your m-file is living.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Object Programming 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!