Dear All
After reading a text file (mgetl), removing the comments, I've finally a
matrix of string containing only numbers... what is the fastest way to
convert those string into reals (I don't remember)?
using "eval" function is quite slow
Thanks
Paul
-
Dear sirs,
Is there a vectorial form of any variant of fprintf function?I would like to
print a matrix of numbers to a specific numbwr of decimal palces.
Thanks for your kind assistance.
Sent from my Nokia phone
___
users mailing list
users@lists.scil
Dear sirs,
Is there a vectorial form of any variant of fprintf function?I would like to
print a matrix of numbers to a specific numbwr of decimal palces.
Thanks for your kind assistance.
Sent from my Nokia phone
___
users mailing list
users@lists.scil
Hi Calixte,
Thanks for your feedback, the beatiful example and very useful script.
The weighted least squares cubic spline fitting function (lsq_splin) seems
to work very well for outliers of moderate magnitude. However, it seems to
fail for larger outliers:
// Replace for instance the
Hello Stéphane,
Tried optim using a true L1-norm on your script.
It seems to work but results are not necessarily better than your previous
srqt trick:
function r=resid(coef, x, y, z)
r = sum(abs(z-(coef(1)+coef(2)*x+coef(3)*y)));
endfunction
n=10;
[x,y]=meshgrid(linspace(-1,1,n
Hi,
It works in changing f in something else, e.g. foo or toto.
It is a bug in intc macro: please report it on bugzilla.scilab.org.
Thanks
Calixte
On 04/03/2013 17:04, Dang, Christophe wrote:
Hello,
De la part de haasejos
Envoyé : lundi 4 mars 2013 16:05
Scilab prints the errormessage "er
Hi Samuel,
You could try something like:
c = (1:10)';
fd=mopen("/tmp/foo.bar");
mfprintf(fd, "%5.3f\n", c);
mclose(fd);
If you need to print a matrix you can do
A=rand(3,4);
fd=mopen("/tmp/bar.foo","wt");
mfprintf(fd, "%5.3f %5.3f %5.3f %5.3f\n",A)
mclose(fd);
Best regards
Calixte
On 04/03/20
Dear Sir,
I would like to print a given column in a matrix with a specific number of
decimal places. The *format* function does not give the same number of
decimal places for columns containing data of varying length. On the other
hand, *fprintf* and the like appear suitable for single float at a
Hi Rafael,
You can try to use lsq_splin along the axes x and y.
It seems to work on the following example:
x = %pi * [-1:0.05:1]';
z = sin(x)*cos(x)';
f = gcf();
f.color_map = jetcolormap(32);
subplot(131);
xtitle("Exact values");
plot3d(x, x, z, 70, 70);
e=gce();
e.color_flag = 1;
z = z + 0.5
Hello,
I have written a little script making the comparison between L1 and L2
norm. For the L1 case, I have used leastsq and cheated by returning the
square root of the abs of the residue and the 'nd' option.
function r=resid(coef,x,y,z)
r=sqrt(abs(z-(coef(1)+coef(2)*x+coef(3)*y)));
Thanks Stéphane for the useful L1-references and for the insight on
iterative L2 methods and to the others for their repplies.
PS:
Strong outliers or spikes have infinite bandwidth and therefore bandpass
filtering/convolution does not seem, a priori, to be the most effective
method to remove them.
Hello,
De la part de haasejos
Envoyé : lundi 4 mars 2013 16:05
> Scilab prints the errormessage "error 26 Too complex recursion!"
> What should be changed to succeed?
After a few tries,
I have the feeling that f is redefined
-->disp(f)
[gg2]=f(xi)
if you replace f by sin in g2, this solevs
hello,
I would like to run a type of script as shown below. Scilab prints the
errormessage "error 26 Too complex recursion!" What should be changed to
succeed?
best regards
Josef
*
function [gg2]=g2(xi);
gg2=f(xi)*exp(imult(-2*nn*%pi*xi/L));
endfunction;
function y=f(x);
y = sin(x);
Hello,
Replacing the squared L2 norm by the L1 norm in the linear regression
gives a good robustness to outliers (cf. Donoho and al. papers). The
problem is then non differentiable but you can implement it by
iteratively reweighting the classical L2 method (IRLS method), or by
writing an equi
Le 04/03/2013 13:23, Dang, Christophe a écrit :
.../...
I personally would try Fourier filtering:
a strong outlier means a steep slope
and therefore correspond to a high frequency.
Thus fft2, set high frequencies to 0
(with possibly a smooth transition),
then inverse fft2 -- ifft2 does not exis
Hello,
De la part de Rafael Guerra
Envoyé : lundi 4 mars 2013 04:37
> Does somebody know if there are Scilab functions
> [...] that smooths
> experimental data z=f(x,y) and is immune to strong outliers.
imho, the problem with smoothing and outliers is that
the definition of a outlier depends on
Hello,
De la part de grivet
Envoyé : vendredi 1 mars 2013 16:26
> a further question: how can I define my own color map ?
As an error message was in French, I assume you're a native speaker.
For the color map, maybe you coud have a look at :
http://fr.wikibooks.org/wiki/D%C3%A9couvrir_Scilab/
17 matches
Mail list logo