Filter löschen
Filter löschen

Printing only the final result of the while loop

1 Ansicht (letzte 30 Tage)
Brooke
Brooke am 17 Jan. 2012
Hi, I have a matlab code that is of the form:
Initial conditions values of x, y
While loop In which the values of x and y are redesignated
Now i want to print the final values of x and y so I tyoed fprintf(...) after the end of my whhile loop
But it prints the initial values instead, what should I do?
Thanks
  2 Kommentare
Grzegorz Knor
Grzegorz Knor am 17 Jan. 2012
First of all, paste your code, it will be easier to help.
Doug Hull
Doug Hull am 17 Jan. 2012
I suspect you are not 'redesignating' the variables like you think you are. Please post code.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by