From: Jeff Krampf on 4 May 2010 22:17 also along the same lies, I'd like to only display the real values as well, ignoring the imaginary answers.
From: ImageAnalyst on 4 May 2010 22:44 On May 4, 10:17 pm, "Jeff Krampf" <jakra...(a)hotmail.com> wrote: > also along the same lies,....... --------------------------------------------------- Well at least you're being honest, er, well maybe not. Anyway, usually people don't admit that.
From: Jeff Krampf on 4 May 2010 22:54 *lines.... sorry matlab is eating big chunks of my brain, I apologize for the typos and just completely incoherent comments.
From: Steven Lord on 4 May 2010 23:25 "Jeff Krampf" <jakrampf(a)hotmail.com> wrote in message news:hrqkbt$nsh$1(a)fred.mathworks.com... > Walter Roberson <roberson(a)hushmail.com> wrote in message > <hrqjjh$ddu$1(a)canopus.cc.umanitoba.ca>... >> Jeff Krampf wrote: *snip* > Now I've got a question that really shows how little matlab experience I > have, my output arrays like : > > (7365200837329^(1/2)/10445874 + 4916269503883/18186047270646)^(1/2) > (7365200837329^(1/2)/10445874 + 4916269503883/18186047270646)^(1/2) > (4916269503883/18186047270646 - 7365200837329^(1/2)/10445874)^(1/2) > -(1/10445874*7365200837329^(1/2) + 4916269503883/18186047270646)^(1/2) > (4916269503883/18186047270646 - 7365200837329^(1/2)/10445874)^(1/2) > -(1/10445874*7365200837329^(1/2) + 4916269503883/18186047270646)^(1/2) > -(4916269503883/18186047270646 - 1/10445874*7365200837329^(1/2))^(1/2) > -(4916269503883/18186047270646 - 1/10445874*7365200837329^(1/2))^(1/2) > > is there any way to make it display the numbers as simple decimal numbers, > and also, is there anyway to make it only display positive values since > those are the ones I am interested in? Since there's no symbolic variables in those expressions, you can convert them to DOUBLE. If those expressions did contain symbolic variables, you could SUBS values into them or evaluate them using variable precision arithmetic with VPA. -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
From: Walter Roberson on 4 May 2010 23:40 Jeff Krampf wrote: > Now I've got a question that really shows how little matlab experience I > have, my output arrays like : > > (7365200837329^(1/2)/10445874 + 4916269503883/18186047270646)^(1/2) > (7365200837329^(1/2)/10445874 + 4916269503883/18186047270646)^(1/2) > (4916269503883/18186047270646 - 7365200837329^(1/2)/10445874)^(1/2) > -(1/10445874*7365200837329^(1/2) + 4916269503883/18186047270646)^(1/2) > (4916269503883/18186047270646 - 7365200837329^(1/2)/10445874)^(1/2) > -(1/10445874*7365200837329^(1/2) + 4916269503883/18186047270646)^(1/2) > -(4916269503883/18186047270646 - 1/10445874*7365200837329^(1/2))^(1/2) > -(4916269503883/18186047270646 - 1/10445874*7365200837329^(1/2))^(1/2) > is there any way to make it display the numbers as simple decimal > numbers, If you wish to use a particular number of decimal places (e.g., suppose you had reason to evaluate to 25 decimal places -- or reason that the arithmetic should be done in 10 decimal places rather than floating point), use vpa() If you wish to convert to Matlab double precision numbers, use double(). > and also, is there anyway to make it only display positive > values since those are the ones I am interested in? That could be done at the symbolic level, but I would have to cross-check the references to be sure I was telling you the correct way. And it wouldn't be short or simple. So, what I suggest is that you use double() to convert the values and store that in a Matlab array, and then use logical indexing to select the ones you are interested in. For example, if the symbolic results were in S, then: sd = double(S); sd = sd(real(sd) > 0 & imag(sd) == 0);
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: export a cell of strings as a text file Next: Windows 7 Installation Problem |