[Scilab-users] Running an .sce from the command line. message 9 (scilab: message 11 of 20) of 20)
scilab.20.browseruk at xoxy.net
scilab.20.browseruk at xoxy.net
Fri Apr 1 02:56:20 CEST 2016
Tim,
I've implemented that, and it certainly avoids the singularity; but creates other problems.
For example: To choose the colors for successive plots, I set up a list:
rgb = list( [0,0,0], [1,0,0], [0,1,0], [0,0,1], ... );
and supplied the color to plot using:
for i = 1:size( files, 'r' )
[ H, tH ] = fscanfMat( files(i), "%lg" );
...
plot( a, b, 'color', rgb(i) )
end
but plot2d() requires a *color index*
So (after trying a bunch of other things) I came up with:
rgb = list( color(0,0,0), color(1,0,0), color(0,1,0), color(0,0,1), ... );
for i = 1:size( files, 'r' )
[ H, tH ] = fscanfMat( files(i), "%lg" );
...
plot2d( 'ln', a, b, style = [ rgb(i) ] );
end
which compiles and runs without error, but draws everything in black?
I need a logflag parameter for plot(); or a sane color(rgb) option for plot2d()?
Alternatively, insight to whatever magic/error trapping/error control that the plot2d( 'nl' ) flag uses to avoid the singularity problem?
Cheers, Buk.
(BTW: I enjoyed reading the bits of your book you pointed me at; and (with your permission) I might ask for a little 'advice' off-list on the subject of friction: aluminium on teflon and the problems of 'creep'. Be warned before you agree. I know next to nothing about friction! )
> -----Original Message-----
> From: scilab.browseruk.1ebb8b2ddb.tim#wescottdesign.com at ob.0sg.net
> Sent: Thu, 31 Mar 2016 17:33:23 -0700
> To: users at lists.scilab.org
> Subject: Re: [Scilab-users] Running an .sce from the command line.
> message 9 (scilab: message 11 of 20) of 20)
>
>
>
> plot2d (a, b, logflag = "ln")
> Look at help for plot2d for details.
>
>
> Sent from my Verizon Wireless 4G LTE smartphone
>
> -------- Original message --------
> From: scilab.20.browseruk at xoxy.net
> Date: 03/31/2016 4:38 PM (GMT-07:00)
> To: users at lists.scilab.org
> Subject: Re: [Scilab-users] Running an .sce from the command line.
> message 9
> of 20)
>
> Samuel,
>
> Thanks. I had to do it in two steps:
>
> f = gcf();
> f.closerequestfcn="exit(0)";
>
> otherwise I get:
>
> gcf().closerequestfcn="exit(0)";
> !--error 2
> Invalid factor.
>
> The focus still returns to the command line console pushing the graphics
> window into the background and meaning I have to go looking for it to see
> the plot; but when I close it the console exits back to the OS.
>
> Next problem, that should probably be a new thread: How to avoid the
> Singularity of log function from preventing the script completing if the
> data contains zeros?
>
> I'm doing:
>
> plot( log10( a ), b );
>
> To produce the log plot.
>
>
>
>> -----Original Message-----
>> From: scilab.browseruk.bb30c473ec.sgougeon#free.fr at ob.0sg.net
>> Sent: Thu, 31 Mar 2016 21:09:20 +0200
>> To: users at lists.scilab.org
>> Subject: Re: [Scilab-users] Running an .sce from the command line.
>> (scilab: message 9 of 20)
>>
>> Hello,
>>
>> Le 31/03/2016 20:35, scilab.20.browseruk at xoxy.net a écrit :
>>> Hi,
>>>
>>> I can run my .sce file which produces a graph from a file of data from
>>> the (windows) command line using:
>>>
> >> scilex -f myscript.sce filename.rdat
>>>
>>> and that works except:
>>>
>>> Once the plot() executes and the graphic window appears, control and
>>> focus returns to the interactive command line.
>> Scilab's console, i guess not the shell terminal.
>>
>>> That's okay; but it'd would be really nice if the focus remained on the
>>> graphic window until it was closed and then the scilab shell exited
>>> automatically.
>> Graphics are not modal: AFAIK it is not possible to lock the console
>> with a figure until the figure is closed (or until any other event)(you
>> could use a for loop waiting for an event ; but it won't reject CTRL-C
>> interruptions).
>> However, to close automatically Scilab when the figure is closed, you
>> may add the following in your script:
>> gcf().closerequestfcn="exit(0)";
>>
>> HTH
>> Samuel
>>
>> _______________________________________________
>> users mailing list
>> users at lists.scilab.org
>> http://lists.scilab.org/mailman/listinfo/users
>
> ____________________________________________________________
> Can't remember your password? Do you need a strong and secure password?
> Use Password manager! It stores your passwords & protects your account.
> Check it out at http://mysecurelogon.com/manager
>
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
____________________________________________________________
Can't remember your password? Do you need a strong and secure password?
Use Password manager! It stores your passwords & protects your account.
Check it out at http://mysecurelogon.com/password-manager
More information about the users
mailing list