My command window doesn't run the scrip

I have my code in the script window. When i press the Run button it doesn't perform any calculations; instead i get this in command window:
EDU>> IChe10
IChe10 is the name of the file. I have tried everything using different file names, different locations for the file, i reinstalled the app again but no luck. I have OS X Mavericks system i hope this is not the problem.
Thanks

13 件のコメント

per isakson
per isakson 2014 年 10 月 21 日
編集済み: per isakson 2014 年 10 月 21 日
And no message?
Try something like a script named HelloWorld.m consisting of one line
disp('Hello World')
Click the Run-button. What happens? Should display "Hello World" in the command window.
Shakar Bradost
Shakar Bradost 2014 年 10 月 21 日
This worked! But why it's not running my code?
per isakson
per isakson 2014 年 10 月 21 日
What do you expect your code to do? Maybe it runs in silence.
Shakar Bradost
Shakar Bradost 2014 年 10 月 21 日
What do you mean in silence?
I just tested a simple calculation like this:
a = 2
b = 2*a
Didn't work either. Just gave me file number! Is this normal?
per isakson
per isakson 2014 年 10 月 22 日
編集済み: per isakson 2014 年 10 月 22 日
"silence" &nbsp run but not leave any traces
"file number" &nbsp What's that?
Try with
clear
clc
a = 2
b = 2*a
whos
Does nothing show in the command window?
Shakar Bradost
Shakar Bradost 2014 年 10 月 22 日
Yeah it does works this way. I'm confused now this one works as well but mine still no luck
Shakar Bradost
Shakar Bradost 2014 年 10 月 22 日
編集済み: Shakar Bradost 2014 年 10 月 22 日
Here's the problem take a look. The workspace is ok but command window not responding!
per isakson
per isakson 2014 年 10 月 22 日
編集済み: per isakson 2014 年 10 月 22 日
I'm convinced that your scripts runs.
How do you know that it does not? What do you expect will happen?
The variables show up in the workspace window.
Shakar Bradost
Shakar Bradost 2014 年 10 月 22 日
編集済み: Shakar Bradost 2014 年 10 月 22 日
It should perform calculations, it's not just bunch of assigned variables. The this is lower part of the code. It's not that complex either i dont know what's wrong with it!
per isakson
per isakson 2014 年 10 月 22 日
編集済み: per isakson 2014 年 10 月 22 日
I'm still convinced it runs. Exactly, how do you know that it does not?
Run
  • clear all
  • clc
  • YourScript
Inspect the variables in the Workspace window
Shakar Bradost
Shakar Bradost 2014 年 10 月 22 日
You are right. All calculations are 100% in the Workspace. But how do i make them show in command window? Thanks for the help
per isakson
per isakson 2014 年 10 月 22 日
編集済み: per isakson 2014 年 10 月 22 日
You have to start using the on-line documentaiton.
  • Semicolon. .... Used after an expression or statement to suppress printing ...
  • disp &nbsp look it up
  • fprintf ...
  • and more
Shakar Bradost
Shakar Bradost 2014 年 10 月 22 日
Thanks a lot now i see where the problem is. Peace

サインインしてコメントする。

回答 (1 件)

Shakar Bradost
Shakar Bradost 2014 年 10 月 22 日

0 投票

Thanks to per isakson . Problem solved

カテゴリ

ヘルプ センター および File ExchangeVariables についてさらに検索

質問済み:

2014 年 10 月 21 日

回答済み:

2014 年 10 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by