Why is 'step' function not accessible (MATLAB online and installed)

10 Ansichten (letzte 30 Tage)
Angela Mitevska
Angela Mitevska am 13 Jan. 2023
Beantwortet: Steven Lord am 15 Jan. 2023
When I use 'step' function, I get a response of 'Unrecognized function or variable 'step'". I tried matlab online, and my installed version is updated.
My installed MATLAB version: 9.13.0.2126072
MATLAB online version: 9.13.0.2145394
Apparently, the step function doesnt require a specific toolbox either, so Im not sure what the issue is.
  2 Kommentare
Steven Lord
Steven Lord am 13 Jan. 2023
There are a number of different functions or object methods named step. How are you trying to call this function, with which input arguments?
Please show us your step call and show us exactly what sizes / types the input arguments you're trying to pass into step are. The whos function will help show us information about those inputs.
Angela Mitevska
Angela Mitevska am 15 Jan. 2023
Im trying to generate a step response function. I made a plot of random dots and typed step after; this was to check my matlab functionality for a class assignment. I attached an image of the result I was supposed to get:
code:
plot(rand(10,1),'.')
step

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Steven Lord
Steven Lord am 15 Jan. 2023
As far as I'm aware none of the functions named step in MATLAB can be called with no input arguments. Is this perhaps a script or function your professor has written for your class? Or is this a script or function that you've written to solve your assignment?
If it is a program you've written or downloaded, make sure it's in a file named step.m in a directory on the MATLAB search path. One directory that is on the search path is the user path. If you're on Windows, run this command and put the file in that directory:
winopen(userpath)
If you're not on Windows, display the userpath and put your file in that directory.

Kategorien

Mehr zu Manage Products finden Sie in Help Center und File Exchange

Produkte


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by