My command window doesn't run the scrip
Ältere Kommentare anzeigen
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 Kommentare
per isakson
am 21 Okt. 2014
Bearbeitet: per isakson
am 21 Okt. 2014
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
am 21 Okt. 2014
per isakson
am 21 Okt. 2014
What do you expect your code to do? Maybe it runs in silence.
Shakar Bradost
am 21 Okt. 2014
per isakson
am 22 Okt. 2014
Bearbeitet: per isakson
am 22 Okt. 2014
"silence"   run but not leave any traces
"file number"   What's that?
Try with
clear
clc
a = 2
b = 2*a
whos
Does nothing show in the command window?
Shakar Bradost
am 22 Okt. 2014
Shakar Bradost
am 22 Okt. 2014
Bearbeitet: Shakar Bradost
am 22 Okt. 2014
per isakson
am 22 Okt. 2014
Bearbeitet: per isakson
am 22 Okt. 2014
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
am 22 Okt. 2014
Bearbeitet: Shakar Bradost
am 22 Okt. 2014
per isakson
am 22 Okt. 2014
Bearbeitet: per isakson
am 22 Okt. 2014
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
am 22 Okt. 2014
per isakson
am 22 Okt. 2014
Bearbeitet: per isakson
am 22 Okt. 2014
You have to start using the on-line documentaiton.
- Semicolon. .... Used after an expression or statement to suppress printing ...
- disp   look it up
- fprintf ...
- and more
Shakar Bradost
am 22 Okt. 2014
Antworten (1)
Shakar Bradost
am 22 Okt. 2014
0 Stimmen
Kategorien
Mehr zu Variables finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!