Error 10000 scilab

Hi I am new to scilab and don't have much mathematical background. I have been following code for another example and am being shown error 10000 for the following code: function [z]=f(x,y) z=...

Hi I am new to scilab and don’t have much mathematical background.
I have been following code for another example and am being shown error 10000 for the following code:

function [z]=f(x,y)
    z=0.026*(1.0-(y/ym))*y;
endfunction;

ym=12000;
x0=1950;y0=2555;xn=5;h=10;

x=[x0:h:xn];

y=ode("rk",y0,x0,x,f);

disp("x      y")
disp("--------")
disp([x'y']);

function z=fe(x)
z=ym/(1-(1-ym/y0)*e^(-k*(t-t0)));
endfunction;

xe=(x0:h/10:xn);

n=length(xe)
for i=1:n
    ye(i)=fe(xe(i));
end;

plot (x,y,'ro',xe, ye,'-b');legend ('rk4','Exact',3);
xtitle('solving dy/dx=k(1-y/ym)y','x','y');

I have worked through several other error messages. I am lost and don’t know if the problem is in the code or the way I set up the problem. The following is the current error message:

!--error 10000 
plot: Wrong size for input argument #2: A non empty matrix expected.
at line      57 of function checkXYPair called by :  
at line     235 of function plot called by :  
plot (x,y,'ro',xe, ye,'-b');legend ('rk4','Exact',3);
at line      25 of exec file called by : 

I would appreciate any help.
Thanks

Scilab Help >> Scilab > Error handling > error

Syntax

error(message)
error(message, n)
error(n, message)

Arguments

message

Vector of strings. The error message to be displayed.
Each component is displayed on a separate line.
Providing an error message translated with gettext(…)
is a good practice.

n

integer > 0: numerical identifier ascribed to the error. Default = 10000.
While the message is often translated into the current session language,
n allows to test the error in a language-independent way.

Description

error(…) allows to issue an error. By default error

  • stops the current execution,
  • displays in the console the recursive calling tree leading to the error,
  • displays the given error message,
  • and resumes to the prompt level.

In order to handle the error without stopping the execution, it is possible to catch
it by using try … catch or execstr(…,'errcatch'),
and to test it with lasterror(…).

error(message) yields an error #10000 (and displays the given
message).

error(message, n) displays the character string contained in
message. The numerical identifier ascribed to the error is
n.

See error_table for a list of standard error messages.
Most of them are already translated in the 4 main supported languages.

Examples

function test(a)
    if argn(2)~=1
        msg = gettext("%s: Wrong number of input arguments: %d expected.n")
        error(msprintf(msg, "test", 1))
    end
endfunction
function myfun()
    a = 1;
    test()
endfunction



error(['A multi line' 'error message'])
error(500, 'Error: my error message')
[m, n] = lasterror()

test()
myfun()
--> error(['A multi line' 'error message'])

A multi line
error message

--> error(500, 'Error: my error message')

Error: my error message

--> [m, n] = lasterror()
 n  =
   500.
 m  =
 Error: my error message

--> test()
at line     4 of function test

test: Wrong number of input arguments: 1 expected.

--> myfun()
at line     4 of function test
at line     3 of function myfun

test: Wrong number of input arguments: 1 expected.

See also

  • lasterror — get last recorded error message
  • error_table — list of main standard errors messages
  • gettext — indexes or/and translates some indexed english messages
  • warning — warning messages
  • try — beginning of try block in try-catch control
    instruction
  • execstr — execute Scilab code in strings
  • where — get current instruction calling tree

History

Version Description
5.0.0 error(n, message) syntax introduced.
5.4.0 The error function can take vector of strings as input argument.
6.0.0 The error(n) and error(n, pos) syntaxes
are no longer supported: Providing an explicit error message is now mandatory.
There is no longer any absolute error identifier.

На 5.4.1 работает!!!
Дошла до пункта Средство просмотра поверхности вывода, тут проблема возникла с plotsurf.

В примере написано:
Средство просмотра поверхности вывода. Для этого существует функция plotsurf.
Она вызывается из командной строки окна SciLAB и имеет следующие
параметры вызова:
plotsurf( fls [, ivar , ovar , vivar [,npart [,mod]]]) .
Параметры функции:
fls – имя fls-структуры.
ivar – вектор входных переменных (задаются порядковые номера
входных переменных, которые необходимо построить).
ovar – скаляр, номер выходной переменной.
vivar – вектор значений входных переменных.
npart – вектор, number of partitions domain for each input variable.
mod – скаляр, вид отображения поверхности на экране. 1 – grayscale,
2 – jetcolormap, 3 – hotcolormap, 4 – internal color map.

Пример 2.2.
fls=loadfls(flt_path()+»demos/MyEX.fls»);
xbasc();
plotsurf(fls,[1 2],1,[0 0]);

Перед этим все что сделала сохранила таким образом «File –> Export–> To workspace» назвала Invest, и еще так «File –> Export–>To FLS file(scilab)» назвала demos.fls.
Выполняю команду:
—>fls=loadfls(flt_path()+»demos.fls»);
!—error 10000
Unable to open the file!
at line 63 of function loadfls called by :
fls=loadfls(flt_path()+»demos.fls»);

Скажите, пожалуйста, в чем ошибка?

Hi I am new to scilab and don’t have much mathematical background.
I have been following code for another example and am being shown error 10000 for the following code:

function [z]=f(x,y)
    z=0.026*(1.0-(y/ym))*y;
endfunction;

ym=12000;
x0=1950;y0=2555;xn=5;h=10;

x=[x0:h:xn];

y=ode("rk",y0,x0,x,f);

disp("x      y")
disp("--------")
disp([x'y']);

function z=fe(x)
z=ym/(1-(1-ym/y0)*e^(-k*(t-t0)));
endfunction;

xe=(x0:h/10:xn);

n=length(xe)
for i=1:n
    ye(i)=fe(xe(i));
end;

plot (x,y,'ro',xe, ye,'-b');legend ('rk4','Exact',3);
xtitle('solving dy/dx=k(1-y/ym)y','x','y');

I have worked through several other error messages. I am lost and don’t know if the problem is in the code or the way I set up the problem. The following is the current error message:

!--error 10000 
plot: Wrong size for input argument #2: A non empty matrix expected.
at line      57 of function checkXYPair called by :  
at line     235 of function plot called by :  
plot (x,y,'ro',xe, ye,'-b');legend ('rk4','Exact',3);
at line      25 of exec file called by : 

I would appreciate any help.
Thanks

  • alessandro.trap
  • alessandro.trap's Avatar

Hallo, Scilab gives me back the error 10000. Can I have more informations about that.
Thanks

The administrator has disabled public write access.

Hi
Never seen such error number in Mascaret so hard to say more.
Did you try to run your model outside of scilab?
Could you share it in order to see if we could reproduce the error?

Regards

The administrator has disabled public write access.

  • alessandro.trap
  • alessandro.trap's Avatar

The problem is when I set «1» in the «impression» option field, the same error happens if I try to run one of the examples given with Fudaa-Mascaret but only if Casiers are used in the model.

The administrator has disabled public write access.

Hi
It could be logical, in the case of a run from scilab to meet a problem with some printing as you should run a DLL version of mascaret…
In the case of a fudaa run, this this the exe file which are behind so it should work. If there is a crash, this mean there is probably a bug…
Could you share your model in order to let us investigate?

Regards

The administrator has disabled public write access.

When I try to install the new microdaq scilab tools through atoms, I get an installation error, even if I run Scilab in administration mode.

—>atomsInstall(‘microdaq’)
atomsInstall: Error while creating the directory ‘C:PROGRA1SCILAB1.2contribmicrodaq1.2.0’.
!—error 10000

at line 51 of function atomsError called by :
at line 346 of function atomsInstall called by :
atomsInstall(‘microdaq’)


When I try to manually install the new microdaq scilab tools, I don’t get any errors, but when I restart scilab, I don’t see the microdaq toolbox in my local module manager, and there is no Microdaq section in the Xcos palette. I DO get the following warning in the Scilab console when manually installing:

genlib: Processing file: mdaqPWMWrite.sci
genlib: Regenerate names and lib
— Creation of [microdaqlib] (Macros) —
WARNING: genlib: No files with extension .sci found in C:Program Filesscilab-5.5.2contribmicrodaqmacrosuser_blocks
Building blocks…
Building help…

Building the master document:
SCIcontribmicrodaqhelpen_US

Building the manual file [javaHelp] in SCIcontribmicrodaqhelpen_US.
Generating loader.sce…
Generating unloader.sce…
Generating cleaner.sce…

Понравилась статья? Поделить с друзьями:
  • Error 1000 7 бабл квас
  • Error 100 function prototypes do not match
  • Error 100 error loading library crpe32 dll
  • Error 100 disk
  • Error 100 connection closed a connection was closed corresponding to a tcp fin