Re: [Scilab-users] GUI save and import data

2016-09-13 Thread petarf
Hi, I managed to write function to place new values from txt. file instead of
old values. But now when I run the calculation

 Q=findobj("tag","Q"); par(1)=evstr(Q.string); 
 dpTot=findobj("tag","dpTot"); par(2)=evstr(dpTot.string);

these set of lines do not read new values. String Q is evaluated as old
value. Any ideas?

Regards,
Petar



--
View this message in context: 
http://mailinglists.scilab.org/GUI-save-and-import-data-tp4034558p4034566.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] GUI save and import data

2016-09-12 Thread petarf
I apologise for posting twice. I deleted previous post but nothing happend.

Problem was with size/lenght. Thnak you for your help!

Regards,
Petar



--
View this message in context: 
http://mailinglists.scilab.org/GUI-save-and-import-data-tp4034558p4034564.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] GUI save and import data

2016-09-12 Thread petarf
Hi Paul,

Thank you for you fast reply. I managed to do something with save option.

function saveFile

// Gather data
Q=findobj("tag","Q"); parameter(1)=evstr(Q.string);
dpTot=findobj("tag","dpTot"); parameter(2)=evstr(dpTot.string);
rho=findobj("tag","rho"); parameter(3)=evstr(rho.string);
n=findobj("tag","n"); parameter(4)=evstr(n.string);
eta=findobj("tag","eta"); parameter(5)=evstr(eta.string);
dh=findobj("tag","dh"); parameter(6)=evstr(dh.string);
ds=findobj("tag","ds"); parameter(7)=evstr(ds.string);
z=findobj("tag","z"); parameter(8)=evstr(z.string);
Lh=findobj("tag","Lh"); parameter(9)=evstr(Lh.string);
Ls=findobj("tag","Ls"); parameter(10)=evstr(Ls.string);
beta2h=findobj("tag","beta2h"); parameter(11)=evstr(beta2h.string);
m=findobj("tag","m"); parameter(12)=evstr(m.string);
k=findobj("tag","k"); parameter(13)=evstr(k.string);
sh=findobj("tag","sh"); parameter(14)=evstr(sh.string);
ss=findobj("tag","ss"); parameter(15)=evstr(ss.string);
rSl=findobj("tag","rSl"); parameter(16)=evstr(rSl.string);
rSt=findobj("tag","rSt"); parameter(17)=evstr(rSt.string);
zetaMax=findobj("tag","zetaMax"); parameter(18)=evstr(zetaMax.string);
alpha=findobj("tag","alpha"); parameter(19)=evstr(alpha.string);
rDeltaR=findobj("tag","rDeltaR"); parameter(20)=evstr(rDeltaR.string);
rVas=findobj("tag","rVas"); parameter(21)=evstr(rVas.string);
rVah=findobj("tag","rVah"); parameter(22)=evstr(rVah.string);
rDDVa=findobj("tag","rDDVa"); parameter(23)=evstr(rDDVa.string);
rDDuVu=findobj("tag","rDDuVu"); parameter(24)=evstr(rDDuVu.string);
scL=findobj("tag","scL"); parameter(25)=evstr(scL.string);




[FileName]=uiputfile("","","Choose a file name");
Name=fullfile(FileName);
fidI=mopen(Name,'w');
for i=1:size(parameter)

mfprintf(fidI,"%0.5f\n",parameter(i));
end
mclose(fidI);
endfunction

But when I choose to save this parameters to file called data.txt the file
is created but empty. This error occurs:

!--error 204 
':': Wrong type for argument #2: Scalar expected.
at line  36 of function saveFile called by :  





--
View this message in context: 
http://mailinglists.scilab.org/GUI-save-and-import-data-tp4034558p4034563.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] GUI save and import data

2016-09-12 Thread petarf
Hi Paul, 

Thank you for your fast replay. Now I have this problem.


function saveFile

// Gather data
//par=[];
Q=findobj("tag","Q"); par(1)=evstr(Q.string);
dpTot=findobj("tag","dpTot"); par(2)=evstr(dpTot.string);
rho=findobj("tag","rho"); par(3)=evstr(rho.string);
n=findobj("tag","n"); par(4)=evstr(n.string);
eta=findobj("tag","eta"); par(5)=evstr(eta.string);
dh=findobj("tag","dh"); par(6)=evstr(dh.string);
ds=findobj("tag","ds"); par(7)=evstr(ds.string);
z=findobj("tag","z"); par(8)=evstr(z.string);
Lh=findobj("tag","Lh"); par(9)=evstr(Lh.string);
Ls=findobj("tag","Ls"); par(10)=evstr(Ls.string);
beta2h=findobj("tag","beta2h"); par(11)=evstr(beta2h.string);
m=findobj("tag","m"); par(12)=evstr(m.string);
k=findobj("tag","k"); par(13)=evstr(k.string);
sh=findobj("tag","sh"); par(14)=evstr(sh.string);
ss=findobj("tag","ss"); par(15)=evstr(ss.string);
rSl=findobj("tag","rSl"); par(16)=evstr(rSl.string);
rSt=findobj("tag","rSt"); par(17)=evstr(rSt.string);
zetaMax=findobj("tag","zetaMax"); par(18)=evstr(zetaMax.string);



//N=findobj("tag","N"); par(18)=evstr(N.string);

//e=findobj("tag","e"); par(20)=evstr(e.string);
alpha=findobj("tag","alpha"); par(19)=evstr(alpha.string);
rDeltaR=findobj("tag","rDeltaR"); par(20)=evstr(rDeltaR.string);
rVas=findobj("tag","rVas"); par(21)=evstr(rVas.string);
rVah=findobj("tag","rVah"); par(22)=evstr(rVah.string);
rDDVa=findobj("tag","rDDVa"); par(23)=evstr(rDDVa.string);
rDDuVu=findobj("tag","rDDuVu"); par(24)=evstr(rDDuVu.string);
scL=findobj("tag","scL"); par(25)=evstr(scL.string);




[FileName]=uiputfile("","","Choose a file name");
Name=fullfile(FileName);
fidI=mopen(Name,'w');
for i=1:size(par)

mfprintf(fidI,"%0.5f\n",par(i)):
end
mclose(fidI);
endfunction

This is the part where i store data. I get this:
mfprintf(fidI,"%0.5f\n",par(i)):
 !--error 2 
Invalid factor.
at line  45 of function saveFile called by :  
endfunction

Any ideas?

Regards,
Petar




--
View this message in context: 
http://mailinglists.scilab.org/GUI-save-and-import-data-tp4034558p4034560.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] GUI save and import data

2016-09-12 Thread petarf
Hello,

I have created GUI whre you put some data and then it does some calculation
as shown in the picture.
Does anyone know how to store this data into a .txt file. Also, I want to be
able to load data from .txt file?

Regards, Petar

 



--
View this message in context: 
http://mailinglists.scilab.org/GUI-save-and-import-data-tp4034558.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] GUIBUILDER problem!

2015-12-03 Thread petarf
Hi,

Version of Scilab is 5.5.0 and GUIBUILDER is 2.2.

Regards, Petar



--
View this message in context: 
http://mailinglists.scilab.org/Re-GUIBUILDER-problem-tp4033157p4033167.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] GUIBUILDER problem!

2015-11-27 Thread petarf
Hi all,

When I want to make simple pushbutton the figure on which I draw zooms out
and I draw some rectangle but I can't see it. It is moved outside the
figure. When I click to move that push button red rectangle which represents
that button is not at the same place as pushbutton and I have to move that
red rectangle outside of figure to see pushbutton.

Can anyone help with this?

Regards, Petar



--
View this message in context: 
http://mailinglists.scilab.org/GUIBUILDER-problem-tp4033128.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Hypermatrix and user defined function

2015-11-20 Thread petarf
Hi,

I have part of code which calls user defined function:

for i=1:(m+1)
alfac0(i)=atan(Mc(k/2,3,i),Mc(k/2,1,i));
alfas0(i)=atan(Ms(k/2,3,i),Ms(k/2,1,i));
alfap0(i)=atan(Mp(k/2,3,i),Mp(k/2,1,i));

for j=1:k

[xc,zc]=mapToCylinder(alfac0(i),Mc(j,1,i),r(i));

end

end

With this code I only manage to write last value of xc and zc.

When I change xc and zc to:
for i=1:(m+1)
alfac0(i)=atan(Mc(k/2,3,i),Mc(k/2,1,i));
alfas0(i)=atan(Ms(k/2,3,i),Ms(k/2,1,i));
alfap0(i)=atan(Mp(k/2,3,i),Mp(k/2,1,i));

for j=1:k

[MC(j,1,i),MC(j,3,i)]=mapToCylinder(alfac0(i),Mc(j,1,i),r(i));

 
end
end

I get error: hmops: Invalid hypermatrix insertion.

Can anyone help?

Regards,
Petar



--
View this message in context: 
http://mailinglists.scilab.org/Hypermatrix-and-user-defined-function-tp4033111.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Hypermatrix manipulation

2015-11-19 Thread petarf
Hi Rafael,

Is there any possibility to separate columns or rows by comma or other sing
(e.g. parentheses)?

Regards, Petar  



--
View this message in context: 
http://mailinglists.scilab.org/Hypermatrix-manipulation-tp4033098p4033107.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Hypermatrix manipulation

2015-11-19 Thread petarf
Hi Rafael,

With your last advice I only manage to write comma after every value in
matrix, but I need to separate entire columns.

Regards, 
Petar



--
View this message in context: 
http://mailinglists.scilab.org/Hypermatrix-manipulation-tp4033098p4033109.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Hypermatrix manipulation

2015-11-19 Thread petarf
Hi Rafael,

This matrix represents points of geometry of axial fan blade. So the output
format should be something I could load into SolidWorks or similar programs,
but I will investigate that as soon as I write this matrix to a file. 

Thank you, Petar 



--
View this message in context: 
http://mailinglists.scilab.org/Hypermatrix-manipulation-tp4033098p4033106.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Hypermatrix manipulation

2015-11-17 Thread petarf
Dear Rafael,

My matrix is already defined  M(50,3,3,3). These numbers depends on user
input. It could be 100 instead 50. And also matrix is already filled.
Because of this i have trouble with part where you define x,y,.. variables
and later you call them in mfprintf function. 

Is there any possibility that I write only specific part of hypermatrix?

Regards, Petar




--
View this message in context: 
http://mailinglists.scilab.org/Hypermatrix-manipulation-tp4033098p4033101.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users