Running Prewritten MATLAB code

조회 수: 7 (최근 30일)
Emily Wood
Emily Wood 2021년 5월 28일
댓글: Star Strider 2021년 5월 31일
I am an undergraduate research assistant, and very unfamiliar with MATLAB. I have a code I am trying to run, I have tried copying and pasting the code into the workspace and clicking 'Run' with no luck. My computer makes the error sound, but no error message comes up. I am more than happy to provide more detail if needed. My email is ewood45@yahoo.com, I appreciate any help!

채택된 답변

Star Strider
Star Strider 2021년 5월 28일
Open the Editor by typing:
edit
in the Command Window. Paste the code into an editor tab, save it by whatever name you want in your personal MATLAB directory (in Windows, this is C:\Users\<username>\Documents\MATLAB\), then run it.
How you run it is important, since if it is a function, it most likely needs to have input arguments (though not always, it depends on how the function wsas written), otherwise, typing its name in the Command Window or clicking on the green Run arrow in the Editor toolbar will both work.
.
  댓글 수: 2
Emily Wood
Emily Wood 2021년 5월 31일
Thank you so much! It was a function so I was able to type the name and file name into the command window. I appreciate your help!
Star Strider
Star Strider 2021년 5월 31일
As always, my plesure!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by