I have a problem that I have been trying to solve but I run out of ideas.
The programm is as followed: I input two data, which gives the directory to xls files. Those files are read, and the values they contain as well. Those values undergo several calculation to give an output vector. My goal is to plot this output vector. If I do it by hand: no problem. But what I tried to create is a GUI interface to make more user friendly. The computation does not have any problem. I have a button that launches is. It works.
But then I have another button to plot the result but I cannot get it to work. The axis are present, but Matlab does not understand which value I want to plot. My first idea was to read the data from the file created contaning the output vector. Given that it s a file created by matlab, it is quiet tricky to extract the values - it does not recognise any extension I put on it. So I decided to keep the output values as a vector inside matlab. But I don't know how to link the vector that is present in the function for the computation push button to the plot function button.
I tried the following way:
(TF_CMB and TF_B are the data I am trying to plot versus the frequence)
In the computation function:
And then in the plot function
TF_CMB = get(handles.button_start);
TF_B = get(handles.button_start);
This is error that comes from it:
_??? Error using ==> plot
Conversion to double from struct is not possible.
Error in ==> cmb>pushbutton5_Callback at 183
Error in ==> gui_mainfcn at 96
Error in ==> cmb at 20
Error in ==>
??? Error while evaluating uicontrol Callback_
Any ideas ?