[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: different jsurface-results between MuPAD- and Octave-Evaluation :(
From: |
Colin Macdonald |
Subject: |
Re: different jsurface-results between MuPAD- and Octave-Evaluation :( |
Date: |
Fri, 10 Nov 2017 19:05:25 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 2017-11-10 05:39 PM, Leo Baumann wrote:
I am learning Octave since Sunday and tried to adapt that problem to
Octave. The results are different, the Octave-result is wrong :(
I think you need vectorized operations in your "c" function like ".*"
and "./" and ".^" in a few places.
Something like this:
c=@(the,phi1) abs((cos(pi*h/l*cos(the).*sin(phi1))-cos(pi*h/l))./ ...
(sqrt(1-cos(the).^2.*sin(phi1).^2)));
BTW: next time just paste the code rather than sending a link to a pdf
file (the link for the figures is fine).
best,
Colin