Help with matlab code to plot slope field

21 Ansichten (letzte 30 Tage)
Orchid Poponne
Orchid Poponne am 14 Jun. 2017
Kommentiert: Orchid Poponne am 14 Jun. 2017
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 )

Akzeptierte Antwort

Guillaume
Guillaume am 14 Jun. 2017
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.

Weitere Antworten (0)

Kategorien

Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by