GUI read and write data from workspace
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Kaustubha Govind
am 31 Mär. 2011
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 Kommentare
Siehe auch
Kategorien
Mehr zu Workspace Variables and MAT Files finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!