[Scilab-users] how to faster EVSTR?

CRETE Denis denis.crete at thalesgroup.com
Mon Oct 21 16:37:17 CEST 2019


Hello,
For the first question: did you try 
test_number= msscanf(-1,test_str,'%f');
or 
test_number= strtod(test_str);
?
HTH
Denis
*********************************************
Hi all,

I have a 1 Milion entries array of STRING type (test_str array), I should
convert to number (test_numer array).

I do as follow:
test_number=evstr(test_str) 

It looks like working but it takes a not acceptable time...

Do you have a more clever idea?

---
Sub-question: I have such a long string array because I get it from an
uicontrol 'userdata' and it looks to me only string data can be set as
'userdata'.
Is that true or, in fact, I could simply set the user data as a number array
(without converting it in string witn the 'string' command)?
Now I do as follows:
"set(gcbo,"userdata",[spectrum_unit_x,
string(spectrum(:,1)'),string(spectrum(:,2)')])"

--
Many thanks
cheers
Anna



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
users at lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users



More information about the users mailing list