Help with matlab code to plot slope field
21 ビュー (過去 30 日間)
古いコメントを表示
I have this code from one of my math classes, but when I try to run it, I get an error stating "Undefined function or variable 'SlopeField'." What's wrong with the code, I tried e-mailing the writer but no luck. Would be grateful for any help! Thanks!
% We clear all variables which may have been defined
clear
% These variables define the minimum and maximum values
% for "T" in the slope field.
T_min = -10;
T_max = 10;
% These variables define the minimum and maximum values
% for "Y" in the slope field.
Y_min = -10;
Y_max = 10;
% These variables define the spacings between the slope lines
% in the T and Y directions.
T_step = 1;
Y_step = 1;
% This creates a new figure window and plots the slope field
figure
SlopeField( T_min, T_max, T_step, Y_min, Y_max, Y_step )
0 件のコメント
採用された回答
Guillaume
2017 年 6 月 14 日
Well, you need a file called SlopeField.m somewhere in your matlab path. If you haven't got it, and can't get hold of it, there's nothing you can do short of rewriting it yourself if you know what it's supposed to do.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Creating, Deleting, and Querying Graphics Objects についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!