I kept getting some crashes, and found it to be caused by a line that
can be stripped down to this:
disp(ascii(13)+"a;")
Is there a logical explanation?
Jan
___
users mailing list
users@lists.scilab.org
The main problem I ran into with csvRead was reading files with a
variable number of separators in each row. Then my suggested solution
pads with 0. It could be changed to pad with NaN also.
Using strsplit in each row allows for several separators in the same
conversion. It may still be
Hi Daniel
I made my own csvread, it seems to read your file OK with
exec('JcsvRead3.sce', -1);
M=JcsvRead3('output.txt',' ');
Brgds
Jan
On 2020-09-10 0:03 AM, Daniel Stringari wrote:
Good evening everyone,
I'm integrating scilab with other software, so I need to read an output file
One thing I find is that csvRead does not seem to extract data correctly
in 6.1.0 with " " (double space) as separator.
test4.csv 11 2 3 4
11 21 3 41
6.1.0
csvRead("test4.csv"," ")
ans =
Nan Nan Nan 4.
Nan Nan Nan 41.
6.0.2
csvRead("test4.csv"," ")
ans
csvRead is quite strict regarding column structure etc, but the
associated error message is typical "can not read..". So when it
reports "does not exist", it looks like the file is missing, or
misplaced. If you still think the file is there, you may try this script
that I have used to
I find it safer to process the data without returning to a disk file. As
mentioned I actually prefer to start with mgeti() and read the file as
binary, as then all byte values are accepted.
But anyway with the data separated in lines, it is relatively simple to
split up with the wanted
Antoine
To find out how long the file is (although not strictly necessary) I
normally use:
fid = mopen(datafile,'rb');
mseek(0,fid,'end');
lef=mtell(fid)
mseek(0,fid); Then you can read in the whole file byte by byte (or split
it up if it is big) : data=mgeti(lef,'c',fid);
The rest is
In 6.0.2 I find I need to use:
for i = 1:12, mprintf("Progress = %d\n\n\n", i); sleep(2000); clc(1); end
JÅ
On 2020-04-10 10:50 AM, Rafael Guerra wrote:
for i = 1:12, mprintf("Progress = %d\n\n", i); sleep(2000); clc(0); end
___
users mailing list
Yes! Thank you.
JÅ
On 2020-03-04 0:48 AM, Chin Luh Tan wrote:
hi, sorry to interrupt half way to just give some idea, have you tried
to right click on the Scilab and run it as administrator?
I was facing similar issue on write access even I am the admin for
win10, local acc, but still I
Thank you Samuel
For some reason I get an error message :
--> genlib elementary_functionslib
genlib: Cannot open file ''C:\Program
Files\scilab-6.1.0\modules\elementary_functions\macros\lib''.
ans = F
Although scinotes("lib") opens the file, so it is there.
Anyway, this works fine:
-->
Thank you, Stéphane
So a workaround is:
b =uint64(2)^61+1
bb2=uint64(bin2dec(strsplit(strrev(bitstring(b');
bb1=bitget(b,1:64);
bb2(1)-bb1(1)
ans = 1
A bit of a waste to use uint64 to store single bits, but that is what
bitget does:
--> typeof(bb1)
ans = "uint64"
Jan
On
Federico
Yes, I thought that would be easier. But still not as good as it could
be, as it is difficult to use these function calls directly in
expressions. This is the way I think it should be done in Scilab 6:
function fp=fparts(fid)
[a,b,fpne,d,e]=file(fid);
[u,t,pathandfilename]=file(fd)
Jan
On 2019-12-27 7:54 AM, Federico Miyara wrote:
Dear All,
How can I find the path and name of an open file from its file
descriptor provided by mopen?
Thanks,
Federico Miyara
___
users mailing list
I am not really an expert in this format, but unless you want a very
long file, the logical approach for me would be to make a vector with
zeros representing all samples, then insert the imported tick and tack
samples at the right places, and export to a file with wavewrite or
savewave. Making
As a quick fix, would it work to use a temporary file for the data you
want to append? Something like this
wavwrite(wavdata_24,'temp')
f1=mopen('temp.wav'.,'rb')
wavdata_bytes=mget(n_bytes,'c',f1)
f2=mopen('main.wav','ab')
mput(wavdata_bytes(45:n_bytes),'c',f2)
Brgds
Jan
On 2019-12-18
On 30.11.2017 20:35, rentboi wrote:
Hey everyone
I kept on trying to find out what the error is in the code below,
Apparently your data are not separated by ascii(9) - tab.
Anyway, If you just want the numbers:
temp2=strtod(csvRead("filename", ascii(13),'.','string',[',' '
'])(2:($-1)));
On 28.11.2017 18:58, Rafael Guerra wrote:
In Win7 Scilab 6.0.0 it only worked with Jan's recommendation
(replacing -999 to -9), with or without header.
The original file seems to have numeric data lines with total number
of characters varying from 3270 to 4172 per row.
There must be a
On 28.11.2017 17:53, Jan Åge Langeland wrote:
On 28.11.2017 15:30, Richard llom wrote:
Hello,
when trying to read in this file:
ftp://ftp-cdc.dwd.de/pub/CDC/grids_germany/monthly/radiation_direct/grids_germany_monthly_radiation_direct_201706.zip
with:
M = fscanfMat
On 28.11.2017 15:30, Richard llom wrote:
Hello,
when trying to read in this file:
ftp://ftp-cdc.dwd.de/pub/CDC/grids_germany/monthly/radiation_direct/grids_germany_monthly_radiation_direct_201706.zip
with:
M = fscanfMat('grids_germany_monthly_radiation_direct_201706.asc')
I'm getting an error
In text documents it is good practice to use … (U+2026) rather than ...
. Some text editors (Open Office at least) even quietly autocorrect it.
Should it be allowed in Scilab?
Jan
___
users mailing list
users@lists.scilab.org
Hello
Assuming you have two header lines in your files, try this:
tt=csvRead(log_file,";",[],"double",[".",";";":",";";",",";"],[],[],2)
tv=datenum(tt(:,3),tt(:,2),tt(:,1),tt(:,4),tt(:,5),0)
td=datevec(tv)
Jan
On 07.11.2017 15:38, Richard llom wrote:
Hello,
I have logfiles in the
On 13.09.2017 08:05, Hermes wrote:
Hello,
What is the function in scilab 6.00 that replaces xselect () from previous
versions of scilab?
Have a good day
Gracias
Hermes
show_window() ?
J
___
users mailing list
users@lists.scilab.org
Thank you all for for comments
You may want to comment in the bug report:
http://bugzilla.scilab.org/show_bug.cgi?id=15172
Jan
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users
On 29.05.2017 10:15, Dang Ngoc Chan, Christophe wrote:
Hello,
De : users [mailto:users-boun...@lists.scilab.org] De la part de JLan
Envoyé : samedi 27 mai 2017 10:21
Is there a good explanation for this behavior? [...]
--> d=ascii('°')
d =
194. 176.
I've got the same behaviour here
On 23.03.2017 09:54, fujimoto2005 wrote:
I want to make the matrix whose the first column has the date value such as
2007/5/1 which I can use it in Excel and whose second column has the
numerical value such as 0.12.
How can I construct such mixed data type matrix which I can copy it and
paste
On 22.03.2017 14:49, Jens Simon Strom wrote:
Would you get to BAThour and BATminute the same way?
I would probably have done it in a more complicated way:-), but I like
this solution, it seems quite robust for characters replacing missing
numbers.
In case your number of header lines
On 29.08.2016 02:09, Tim Wescott wrote:
A kludge would be to make it into two integers.
Each case may not be so complex to work around, but in total it seems
like Scilab 6 is not yet well prepared for int64 and uint64.
For instance %x and %o need to be handled too, functions like dec2bin()
Very good, a way of using logical operators that I was not aware of.
Even this seems to works:
data(data<32|data>127)=ascii(".")
Thank you also Samuel for fixing the mgeti('l') bug. Both will help me a
lot in reading and decoding some large seismic files.
Jan Å
On 28.08.2016 06:20, Samuel
Gerhard
Would this work? Read as much as you need as binary and convert the non
ascii values to an ascii value, for instance 0.
The below is not optimized, and I have no idea why the strsplit is
needed, but I got an "unknown error" without it:
fid=mopen(datafile,"rb");
btr=1000;
plot2d(x,[y' z'])// ?
Jan Å
On 24.08.2016 16:00, philippe wrote:
Hi,
Le 21/08/2016 à 08:27, Gerhard Kreuzer a écrit :
here my two attepts one working, one failed, but why?
plot2d(x, [y z]);
//plot2d(x, y);// working
//plot2d(x, z);// working
I suggest a normal distribution:
histplot(10,10+grand(1,1000,"nor",0,.01))
Jan Å
On 10.06.2016 16:41, Dang Ngoc Chan, Christophe wrote:
Hello,
De : De la part de Dang Ngoc Chan, Christophe
Envoyé : vendredi 10 juin 2016 15:38
AFAIK, the sum of two random values following a normal
Reading
Have you tried to delete your configuration files? Could be here:
C:\Users\NN\AppData\Roaming\Scilab
Jan Å
On 25.04.2016 21:13, kjubo wrote:
Dear all,
I encourted a weird problem. After starting to use external monitor with my
notebook, Scilab stopped to work.
I get error messages
On 18.04.2016 21:05, Samuel Gougeon wrote:
afun() is defined in sel(), and so is local to sel(). It is cleared
when leaving sel(). To prevent this, you may return it as "afun" in
the environment calling sel() with:
afun = return(afun)
at the end of sel(), before leaving it.
On 16.03.2016 15:59, fujimoto2005 wrote:
Hi,all
I executed the script with the execute command of the scinote so it failed.
I want to use the execute command of the scinote.
I tried
[units,typs,nams]=file().
But nams are as follows
stderr
!
!
!
!C:\***\gettingScriptName02.sce !
!
!
!stdin
On 16.03.2016 10:11, fujimoto2005 wrote:
Hi,JLAN
Thanks for your reply.
Your code return only
"// -- 16/03/2016 18:04:51 -- //"
as a.
I execute the script containing the following lines with the script name
''gettingSscriptName.sce'
clear;
a=gethistory();
b=strsplit(a($),
On 02.03.2016 10:23, antoine.monmayr...@laas.fr wrote:
Hi all,
I found a bug in scilab 6.0 beta1.
Plot seems to fail for some curves when trying to specify a color
different than the default one:
It works OK for me with Windows 10 and 6.0 beta 1, I can plot any
color. But I get a
ref. the somewhat related bug report:
http://bugzilla.scilab.org/show_bug.cgi?id=14342
Jan Å
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users
On 18.02.2016 08:47, Antoine Monmayrant wrote:
Le 02/17/2016 05:10 PM, JLan a écrit :
Is this just on my machine?
Saddly, no!
I just tried it on my machine (linux ubuntu 14.04 64bits) and bye bye
scilab.
Could you report a bug ?
Antoine
Thank you Antoine
On 16.02.2016 11:55, Eric Dubois wrote:
Don’t other Scilab users share my concern?
Regards
Éric.
I have a similar (but simpler) problem, with stacksize(). All my old
scripts containing stacksize('max') etc. need to be modified.
All it will take is to keep the standard function
The only added bonus with the uicontrol is that you have access to a
callback function to react to the user's action.
Not even: as for the text style (http://bugzilla.scilab.org/7111), the
callback is not implemented for the image style. After your example, add:
h.callback_type=0;
h.callback
On 11.02.2016 20:14, Samuel Gougeon wrote:
Le 11/02/2016 12:01, Jan-Åge Langeland a écrit :
.../...
I would really like to get the cursor position in the callback, like
I do with xclick(), so clicking on different part of the image can
work like a menu (Samuel?):
Why not putting xclick
What would a callback bring anyway, that you cannot do with xclick() ?
Well, callbacks are the "official" way of interacting with the user.
It would allow you to create an intereface in a consistant way, using only
callbacks.
Antoine
Well you can put the image on top of a button:
On 10.02.2016 09:19, Antoine Monmayrant wrote:
f = gcf();
imageWidth = 181;
imageHeight = 144;
f.axes_size=[imageWidth,imageHeight];
//here image parent can be set to something else than the figure f (like a
frame, ...)
h = uicontrol("Parent", f, ..
"Style", "image", ..
"Position", [0 0
On 09.02.2016 20:27, Samuel Gougeon wrote:
You may use the z coordinate of your flat curves to manage overlays,
as in:
clf
x = linspace(0,20,200);
plot(x,sin(x))
e = gce();
c = e.children;
// Example with a local image. The image is from
https://atoms.scilab.org/atoms.png
On 08.02.2016 11:47, antoine.monmayr...@laas.fr wrote:
Hi everyone,
I just failed at placing an image behind a plot.
I thought that would be easy:
- create a figure
- create an image uicontrol
- create an axis
- plot in the axis
- set axis.filled="off"
Apparently I was
On 01.02.2016 17:43, Dang Ngoc Chan, Christophe wrote:
Hello,
De : Jan-Åge Langeland
Envoyé : lundi 1 février 2016 14:41
I ran a little speed test with the different alternatives, I found the results
surprising:
These kind of tests are of course interesting, but I'm always suspicious
I ran a little speed test with the different alternatives, I found the
results surprising:
Jan
//script ftest.sce m=1 n=1 v=ver(); disp(v(1,1:2)); clear a;
timer(); a = zeros(n, m) == 1; //best in Scilab 6.0.0 disp(timer());
clear a; timer(); a=zeros(n,m)>0; disp(timer()); clear a;
I forgot to test a=~ones(n,m). I guess this is the overall winner (from
Stéphane Mottelet):
Scilab 5.5.1: 0.2964019
Scilab 6.0.0: 0.5616036
Jan
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users
It may not solve your problem, but in Scilab 6 you can at least access
the nth element of the first output argument.
--> function c=a(b)
> c(1)=b
> c(2)=b^2
> c(3)= b^3
> endfunction
--> a(2)(2)
ans =4.
Another solution could be like it is done in size(), where an extra
input
The original code seems to run with the small change(note the ' ):
flex(:,1) = dist'; JÅ
On 06.01.2016 11:54, Lester Anderson wrote:
Hello,
A basic query, but I cannot seem to get the Scilab code to run as it
should and plot the data. Not sure where it is falling over. Attached
the code
Have you tried plot() and replot()? You can do quite a bit with that by
using LineSpec and GlobalProperty. The example below includes plotting
with primary and secondary Y axis:
Jan
clf;
t=1:100;
x=t.^2/100;
y=[4,12,32,72,95];
z=[500,1100,2100,4100,5000];
replot([t(1),ceil(t($)); 0, 120]);
I tried to run your function in Windows 10. Memory usage climbs
gradually here also, but when it reaches 90% some action is taken, and
it drops to about 85%. This goes on repeatedly, so I have not yet
observed a crash or major slow-down.
Jan
On 21.12.2015 06:37, Tim Wescott wrote:
I'm
[a y]=max(int8(x>.5),'c');
JÅ
On 30.11.2015 06:54, fujimoto2005 wrote:
I want to get the first column number of each row with %T.
Now I use loop as follows.
x=rand(10,10);
for i=1 :10
y(i)=min(find(x(i,:)>0.5);
end
Is there any way to get y without using 'for end' loop because it
Smart solution from Rafael Guera, I actually needed the same .
Here an inspired alternative with plot(), that also gets the colors
correct (on white background):
x=1:0.1:6;
y1=sin(x);
y2=cos(x);
str="This is a very long legend. Vive la France";
str1= part(str,1:27);
str2= part(str,28:$);
54 matches
Mail list logo