Undefined function error using initial command
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Image Analyst
le 3 Fév 2015
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 commentaires
Voir également
Catégories
En savoir plus sur Entering Commands dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!