|
| <prev next> |
Re: bug in imshow with all negative values: msg#00000gnu.octave.bugs
On Thu, Mar 31, 2005 at 11:07:08AM -0500, John W. Eaton wrote: > Yes, the patch to imshow looks OK to me. But rather than introducing > a function that can only return the max value, how about something > like this: > > s = numeric_limits (class (pi)) > > => s.epsilon = 2.2204e-16 > s.is_exact = false > s.is_integer = false > s.is_signed = true > s.min = 2.2251e-308 > s.max = 1.7977e+308 > > s = numeric_limits (class (uint8 (1))) > > => s.epsilon = 0 > s.is_exact = true > s.is_integer = true > s.is_signed = false > s.min = 0 > s.max = 255 > > and perhaps include all the fields that are available in the C++ > numeric_limits class defined in the <limits> header? > > This function would return an error if given a class that was not a > numeric type. That'd be perfect! > It should be implemented in the octave_value class hierarchy (I could > do this part; for now you could just write a .m file fucntion that > used a switch statement for the common class names and that returned > the info you are interested in). Great. I'll do it this weekend. Thanks! Stefan ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html ------------------------------------------------------------- |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Next by Date: | Re: bug in imshow and one more question about types float32: 00000, Etienne de Foras |
|---|---|
| Next by Thread: | Re: bug in imshow with all negative values: 00000, Stefan van der Walt |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |