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

조회 수: 22 (최근 30일)
Angela Mitevska
Angela Mitevska 2023년 1월 13일
답변: Steven Lord 2023년 1월 15일
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
Steven Lord
Steven Lord 2023년 1월 13일
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 2023년 1월 15일
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

댓글을 달려면 로그인하십시오.

답변 (1개)

Steven Lord
Steven Lord 2023년 1월 15일
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.

카테고리

Help CenterFile Exchange에서 Manage Products에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by