Filter löschen
Filter löschen

CAN ANY ONE TELL ME WHY AM NOT GETTING ANY ERROR AND RESULT i.e. NO ERROR, NO PLOT. [THE MATLAB CODE IS ATTACHED WITH THIS QUESTION FOR YOUR KIND REFERENCE.]

1 Ansicht (letzte 30 Tage)
I tried coding RK method but when I try to run that it is neither showing any plot nor any error.
  2 Kommentare
Stephen23
Stephen23 am 3 Okt. 2018
Bearbeitet: Stephen23 am 3 Okt. 2018
@Gaurav Sharma: please show us how you are calling this function, with the exact values that you used. Note that the number of values plotted and returns depends on the input parameters, so what you are seeing depends entirely on those parameters (which you have not told us).
That code worked for me when I tried it:
>> [X,Y] = RK(3,2,1,4,5,6,3,7,8)
X =
7.0000 -17.4129 -83.1403
Y =
8.0000 13.8611 -61.8887
Gaurav Sharma
Gaurav Sharma am 3 Okt. 2018
Bearbeitet: Image Analyst am 3 Okt. 2018

I APOLOGISE FOR THAT.

RK(1,1,0.5,1,10,10,0.01,0,1)

THE GRAPH SHOULD LOOK LIKE THE ONE I HAVE ATTACHED WITH THIS MESSAGE. THANK YOU.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Image Analyst
Image Analyst am 3 Okt. 2018
Except for the very first point, all your values are NaN, which don't plot. I didn't delve into the equations to figure out why, but you should do that. If you don't know how to debug, see this link http://blogs.mathworks.com/videos/2012/07/03/debugging-in-matlab/ because it's an essential skill you'll need in the future, so time spent learning it is well worth it.

Weitere Antworten (0)

Kategorien

Mehr zu Graphics Performance finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by