help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Ynt: About Array Element Division Problem in Loop


From: Aziz YÜCELEN
Subject: Ynt: About Array Element Division Problem in Loop
Date: Tue, 9 Jul 2019 16:09:44 +0000

Thank you, I understand why now


Gönderen: Nicholas Jankowski <address@hidden>
Gönderildi: 9 Temmuz 2019 Salı 18:33
Kime: Aziz YÜCELEN
Bilgi: address@hidden
Konu: Re: About Array Element Division Problem in Loop
 

m = 0
m = -0.040000 <---- this is actually -2/2 = -1 but octave find -0.04000
m = 0


the operation you're performing at that step is  (50-52)/50 = -0.04

you're inputting your beta_value as a character string.  so the value of ascii '2' is numerical 50, and '4' is 52.  

you should get familiar debugging with setting breakpoints in your script using the GUI or inserting the 'keyboard' command so that you can inspect variable values in the middle of execution.  Also, look at the help for sprintf.  

reply via email to

[Prev in Thread] Current Thread [Next in Thread]