[scilab-Users] Problem Matlab to Scilab conversion

Mathieu Dubois mathieu.dubois at limsi.fr
Mon Oct 26 16:07:14 CET 2009


lester anderson wrote:
> Hello
>
> I have tried to convert the attached Matlab code to work in Scilab, 
> but it keeps failing with the same error at Line 1. If anyone can see 
> what is wrong or how it should look in Scilab that would be great. I'm 
> not a Matlab user so it is all still a bit new! The readme file in the 
> zip explains what the program is supposed to do.
>
> Thanks for any help
>
> Lester
Hello Lester,

If don't know if you still need help but I think that the problem is 
relatively simple.

The file you are (were) trying to convert is '3dinver.m', right?

The first lines contains a lot of comments about how the program works.
AFAIK when Scilab converts a file it tries to generate doc by extracting 
the first lines of comments (I have deduced this by looking at the code 
of the 'mfile2sci' function). The first characters are the function's name.
As the first line starts with a '3' it causes an error because scilab 
functions can't begin with a number (again, this is a guess).

Anyway if you change the first line for instance to 'inver3d' instead of 
'3dinver' (you shall rename the file 'inver3d.m') it works.

Nevertheless scilab warns you that there might be errors.

Hope that helps,
Mathieu



More information about the users mailing list