(sorry, x=3 line was missing)
Hello,
In Scilab 6 you can do:
function y=f(x)
y = list()
y(1) = x ^ 2;
y(2) = x ^ 3;
endfunction
-->x = 3;
--> y = f(x)(2)
y =
27.
--> y = f(x)(1)
y =
9.
Regards,
Rafael
From: users [mailto:users-boun...@lists.scilab.org] On Behalf Of
Hello,
In Scilab 6 you can do:
function y=f(x)
y = list()
y(1) = x ^ 2;
y(2) = x ^ 3;
endfunction
--> y = f(x)(2)
y =
27.
--> y = f(x)(1)
y =
9.
Regards,
Rafael
From: users [mailto:users-boun...@lists.scilab.org] On Behalf Of Soulard,
Christian (GE Power)
Sent: Thursday,
Dear co-scilabers,
The non-linear fitting function datafit() could be very useful. However,
it has presently two important drawbacks that hinder it and somewhat
prevent actually using it. Beyond fixing this, other improvements are
possible.
We propose here to upgrade datafit() in the way
Hello Christian,
AFAIK there is presently no way to skip an output parameter. The more
handy would be
[,y2,,y4] = f(x)
but unfortunately, it does not work (yet?).
I did not find this feature as a wish on bugzilla. IMO it should be.
It is possible to use a one-character variable name, for
Hello,
What is the Scilab way to dump the output of a function ? The Matlab equivalent
is tilde (~).
To give an example, suppose I have an existing function f such as :
function [y_1,y_2] = f(x)
y_1 = x ^ 2;
y_2 = x ^ 3;
enfunction
Suppose I want to use this