GUI read and write data from workspace
3 ビュー (過去 30 日間)
古いコメントを表示
Hello all, I am creating a GUI application for my function: [a_rms,a_w_t,a_w_f,freq] = acc_eight(acc,time,inter,'W'); here a_rms,a_w_t,a_w_f and freq are outputs and acc,time,inter and W (string) are inputs. Input variable "acc" and "time" are vectors with ard 100000 elements and I wish to read these vectors from workspace.I use two edit texts to read input "inter" and "W". I have a slide box and import button which imports data and then I see names of all variables in my slide box. After this I select input "acc" and "time" from the list. To execute my function and calculate on the basis on all workspace and other input I am using"evalin" function as:[acc_w_t,acc_w_f,frequency]=evalin('base',['acc_weight(',acc,',',time,',',inter,',',W,')']); But It reads acc and time from workspace but doesn't read inter and W which are given by user in edit text. Am I using evalin correctly? And how can I transfer back outputs of my function to workspace?
0 件のコメント
回答 (1 件)
Kaustubha Govind
2011 年 3 月 31 日
If inter and W are obtained from an edit box, why do you attempt to evaluate them in the base workspace? You would use something like:
inter = str2double(get(hInterEditBox,'string'));
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!