[Scilab-users] Problems with mfile2sci

classic Classic list List threaded Threaded
8 messages Options
fmiyara fmiyara
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] Problems with mfile2sci


Dear all,

I'm trying to convert a script originally written in Matlab and saved as an .m file to Scilab using the function mfile2sci. However, I don't get any .sci file. I get a .cat file which contains mostly the comments without the comment sign //. I get also a .log file with a brief job summary, indicating that no conversion was performed since "file contains no instruction", which is not the case. I'm attaching the original m file and the .cat and .log files.

Am I doing anything wrong?

I've tried to change the options (recursive mode, etc.)with no success.

I'm using 6.0.2.

Regards,

Federico Miyara 






Libre de virus. www.avast.com

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users

audiometro1.cat (6K) Download Attachment
m2sci_audiometro1.log (604 bytes) Download Attachment
audiometro1.m (11K) Download Attachment
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] Re : Problems with mfile2sci

Hello Federico,

With some end indices in your script, you are certainly facing the bug http://bugzilla.scilab.org/16181
This bug prevents starting the actual conversion.
You may copy the proposed fix on your own Scilab installation, and use it.

Regards
Samuel

----- Mail d'origine -----
Dear all,

I'm trying to convert a script originally written in Matlab and saved as
an .m file to Scilab using the function mfile2sci. However, I don't get
any .sci file. I get a .cat file which contains mostly the comments
without the comment sign //. I get also a .log file with a brief job
summary, indicating that no conversion was performed since "file
contains no instruction", which is not the case. I'm attaching the
original m file and the .cat and .log files.

Am I doing anything wrong?

I've tried to change the options (recursive mode, etc.)with no success.

I'm using 6.0.2.

Regards,

Federico Miyara
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
fmiyara fmiyara
Reply | Threaded
Open this post in threaded view
|

Re: Re : Problems with mfile2sci


Samuel,

Thanks. As I'm not quite sure how to load the fix, I've removed all instances of "end" as an index and defined the required value explicitly with a different, non-reserved name.

But I get the same result ("no translation made..."). I wonder if there may be another regression...

Regards,

Federico


On 07/10/2019 06:10, [hidden email] wrote:
Hello Federico,

With some end indices in your script, you are certainly facing the bug http://bugzilla.scilab.org/16181
This bug prevents starting the actual conversion.
You may copy the proposed fix on your own Scilab installation, and use it.

Regards
Samuel

----- Mail d'origine -----
Dear all,

I'm trying to convert a script originally written in Matlab and saved as
an .m file to Scilab using the function mfile2sci. However, I don't get
any .sci file. I get a .cat file which contains mostly the comments
without the comment sign //. I get also a .log file with a brief job
summary, indicating that no conversion was performed since "file
contains no instruction", which is not the case. I'm attaching the
original m file and the .cat and .log files.

Am I doing anything wrong?

I've tried to change the options (recursive mode, etc.)with no success.

I'm using 6.0.2.

Regards,

Federico Miyara
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users



Libre de virus. www.avast.com

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users

audiometro1.m (11K) Download Attachment
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Re : Problems with mfile2sci

Hello Federico,

Yes, this workaround for the end index shows another issue, indeed.
Scilab 6.0.0 starts the conversion (but yields an "Invalid index" error after processing the first third of the file), while 6.0.1 yields the same "file contains no instruction" message.
In 6.0.1 and 6.0.2, the (first) issue is in the m2sci_syntax() internal.
Could you please report the bug?

Thanks
Samuel

Le 08/10/2019 à 03:39, Federico Miyara a écrit :

Samuel,

Thanks. As I'm not quite sure how to load the fix, I've removed all instances of "end" as an index and defined the required value explicitly with a different, non-reserved name.

But I get the same result ("no translation made..."). I wonder if there may be another regression...

Regards,

Federico


On 07/10/2019 06:10, [hidden email] wrote:
Hello Federico,

With some end indices in your script, you are certainly facing the bug http://bugzilla.scilab.org/16181
This bug prevents starting the actual conversion.
You may copy the proposed fix on your own Scilab installation, and use it.

Regards
Samuel

----- Mail d'origine -----
Dear all,

I'm trying to convert a script originally written in Matlab and saved as
an .m file to Scilab using the function mfile2sci. However, I don't get
any .sci file. I get a .cat file which contains mostly the comments
without the comment sign //. I get also a .log file with a brief job
summary, indicating that no conversion was performed since "file
contains no instruction", which is not the case. I'm attaching the
original m file and the .cat and .log files.

Am I doing anything wrong?

I've tried to change the options (recursive mode, etc.)with no success.

I'm using 6.0.2.

Regards,

Federico Miyara
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users



Libre de virus. www.avast.com

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users



_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Re : Problems with mfile2sci

In reply to this post by fmiyara
Le 08/10/2019 à 03:39, Federico Miyara a écrit :

Samuel,

Thanks. As I'm not quite sure how to load the fix, I've removed all instances of "end" as an index and defined the required value explicitly with a different, non-reserved name.

But I get the same result ("no translation made..."). I wonder if there may be another regression...


Please do the following, assuming that you have write access to the SCI directory:

cd SCI/modules/m2sci/macros/kernel
edit m2sci_syntax.sci
// Replace the line #211
        endofhelp = stripblanks(part(tk,1:kc-1))<>"" & ~protoline

with
      if
stripblanks(part(tk,1:kc-1))<>"" & ~protoline
            endofhelp = %t;
      end

// Save. Then

--> genlib m2scikernellib
--> clear
m2sci_syntax

And re-run mfile2sci.
As with Scilab 6.0.0, the conversion now actually starts, and you will get an error after the line #91 of your script, to be reported as well, separately.

Regards
Samuel


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Re : Problems with mfile2sci

Le 08/10/2019 à 12:21, Samuel Gougeon a écrit :
.../...
And re-run mfile2sci.

As with Scilab 6.0.0, the conversion now actually starts, and you will get an error after the line #91 of your script, to be reported as well, separately.


For some reason, the space between find and its opening ( is not accepted in
n
= min([n, min(find (mini(I)==99))]);
while it is accepted earlier in the script as in

n
= min(find (mini(I)==99));

Another issue (since 6.0.0) is the bad conversion of ":" as in a(1,:), also to be reported.


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Re : Problems with mfile2sci

In reply to this post by Samuel GOUGEON
Le 08/10/2019 à 10:58, Samuel Gougeon a écrit :
> Hello Federico,
>
> Yes, this workaround for the end index shows another issue, indeed.
> Scilab 6.0.0 starts the conversion (but yields an "Invalid index"
> error after processing the first third of the file), while 6.0.1
> yields the same "file contains no instruction" message.
> In 6.0.1 and 6.0.2, the (first) issue is in the m2sci_syntax() internal.
> Could you please report the bug?

No need to report this one. The patch is already put on the scilab forge.


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Re : Problems with mfile2sci

In reply to this post by Samuel GOUGEON
Le 08/10/2019 à 13:11, Samuel Gougeon a écrit :
>
> Another issue (since 6.0.0) is the bad conversion of ":" as in a(1,:),
> also to be reported.
>
Done: http://bugzilla.scilab.org/16215


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users