I have a query regarding some code I tweaked to run under Scilab from the original Matlab version (attached both here). Both give the same result for subplot 1 (upper view), but the lower subplot has different results and I cannot see where the difference is occurring. It is just the one variable 'tecsub' that is different:
Output of Matlab code run under Octave 4.2.1 Time to run: ~75 seconds (Windows 8, 4 Gb RAM)
Also note how fast the code runs under Scilab compared to Octave running broadly the same code. Didn't get to tweak the second subplot axis back to 0 depth at top, but here I'm interested in the values. If someone can see where the variance is great.
Actually, the root problem is not in
Matlabfliplr(A) being replaced by A(:,$:-1:1), as per Scilab help file.
A is a row vector, then
returns a vector of the same length with the order of its elements reversed. If A is a column vector, then
returns A. unchanged.”
The root problem was that the two vectors below in your script were considered row vectors by Octave and column vectors by Scilab.
From: users [mailto:[hidden email]]
On Behalf Of Rafael Guerra Sent: Tuesday, July 17, 2018 4:08 PM To: Users mailing list for Scilab <[hidden email]> Subject: Re: [Scilab-users]
Matlab to Scilab code query
Your problem seems to be fixed by defining in Scilab:
Wd=Wd($:-1:1);// Scilab reverse
For vectors, the L-R flip should be instead reverse order.
Regarding the massive time savings of Scilab 6 vs Octave, I see it on the first time the code is run but not afterwards.