Running Prewritten MATLAB code

8 ビュー (過去 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 Center および File ExchangeStartup and Shutdown についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by