|
From: | Joanna Cheng |
Subject: | Re: Find the Max Value in a Vector |
Date: | Thu, 9 Feb 2012 07:46:00 +1100 |
On Wednesday, February 08, 2012 07:45:42 am Michael Davidson wrote:
> Thank you for the help. I apologize for the sassy question, but Octave
> problems were the straw that broke the camel's back on a bad day. It
> appears that this was a PEBCAK.
> On Tue, Feb 7, 2012 at 10:38 PM, Joanna Cheng
<address@hidden>wrote:
> > octave-3.2.4.exe:24> x=rand(20,1)
> > x =
> >
> > 0.570176
> > 0.908796
> > 0.815253
> > 0.437041
> > 0.244348
> > 0.840917
> > 0.212318
> > 0.019978
> > 0.042693
> > 0.551441
> > 0.607535
> > 0.701187
> > 0.235667
> > 0.456407
> > 0.046169
> > 0.366124
> > 0.199947
> > 0.174513
> > 0.299213
> > 0.532349
> >
> > octave-3.2.4.exe:25> max(x)
> > ans = 0.90880
is set to display only five in its answers, the default. 0.908796, the second> >The values in your vector are printed using six decimal places. Your Octave
entry above, rounds to 0.90880. Display one more place and you ought to see
the two as the same.
[Prev in Thread] | Current Thread | [Next in Thread] |