Re: [Scilab-users] mlist parameters to a function call

2016-01-22 Thread Serge Steer

Le 23/01/2016 06:47, eddydde a écrit :

probably a newby question, but I can't get this right:

see example below, parameters for the function seem to get disordered


Any help would be welcome!

the instruction "return y" must be removed!
Serge


Ed

a1=4.6543
a2=1435.264
a3=-64.848
b=[4.6543,1435.264,-64.848]
c=[4.6543,1435.264,-64.848;
 1,2,3]
d.name='ed'
d.aa=c
disp(10^(a1-a2/(373.15+a3)))

function y=pv(T,x)
 t=x(1)-x(2)/(T+x(3))
 y=10^t
 disp(y)
 return y
endfunction

pv(373.15,[a1,a2,a3])
pv(373.15,b)
pv(373.15,c(1,:))
pv(373.15,c)
pv(373.15,d.aa(1,:))
xa=[273:10:373]
pv(xa(11),b)
pv(xa,[a1,a2,a3])
pv(xa,d.aa(1,:))




--
View this message in context: 
http://mailinglists.scilab.org/mlist-parameters-to-a-function-call-tp4033316.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] mlist parameters to a function call

2016-01-22 Thread eddydde
probably a newby question, but I can't get this right:

see example below, parameters for the function seem to get disordered


Any help would be welcome!

Ed

a1=4.6543
a2=1435.264
a3=-64.848
b=[4.6543,1435.264,-64.848]
c=[4.6543,1435.264,-64.848;
1,2,3]
d.name='ed'
d.aa=c
disp(10^(a1-a2/(373.15+a3)))

function y=pv(T,x)
t=x(1)-x(2)/(T+x(3))
y=10^t
disp(y)
return y
endfunction

pv(373.15,[a1,a2,a3])
pv(373.15,b)
pv(373.15,c(1,:))
pv(373.15,c)
pv(373.15,d.aa(1,:))
xa=[273:10:373]
pv(xa(11),b)
pv(xa,[a1,a2,a3])
pv(xa,d.aa(1,:))




--
View this message in context: 
http://mailinglists.scilab.org/mlist-parameters-to-a-function-call-tp4033316.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Xcos: Error when running a compiled superblock

2016-01-22 Thread ENd48
Good morning,

I'm trying to compile a superblock but I've got problem running the
simulation afterwards.
Here is what I do:
 * I create a very simple diagram (constant value fed into the two ports of
a sum block then a AFFICH_m block with an event clock)
 * I convert the sum block into a superblock
 * At this stage the diagram works just well
 * I then compile the superblock (right click -> compile)
 * The compilation works and the diagram is still working
 * Now if I close Scilab and reopen it, I run the "loader.sce" file that has
been generated during the compilation (I get a "Link done" message)
 * If I try to run the diagram, I got an error message like this one:
  o=Untitled__111506_c('set',o)
!--error 4 
  Undefined variable: Untitled__111506_c
 
 
  do_eval: Error while calling block Untitled__111506_c
[uid='-16a0de62:15268d37 
   216:-7fb8']: invalid parameter (ier=4.00,
%scicos_prob=%F).   

Does anybody know about such an error? What could be the solution to this
problem?

Thanks in advance for your help.

Regards,
Benoit



--
View this message in context: 
http://mailinglists.scilab.org/Xcos-Error-when-running-a-compiled-superblock-tp4033315.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users