Info

This question is closed. Reopen it to edit or answer.

How to get all the values of array

1 view (last 30 days)
Das Bably
Das Bably on 8 Mar 2013
Hi I made a parent GUIDE that consists of 3 children GUIDE and the output of children GUIDE I am using as input of Parent GUIDE by saving and retriving data from workspace but when I am going to calculate output that will be in array i am getting the only last value of the array but when I did the whole process only for a single GUIDE then the ans of all values are found in the array. like I am using the coding in Parent GUIDE compute pushbutton callback look like as below
c=486;
freq= linspace(1,11000,1000);
for ii= 1:1000
w=freq(ii);
k=w/c;
f(ii)=w/(2*pi);
Tout=[1;1]; %dummy values which has no influence
T1=[evalin('base','TR1')];
T2=[evalin('base','TR2')];
T3=[evalin('base','TR3')];
T_tot=T1*T2*T3;
Tin=T_tot*Tout;
Powin(ii)=0.5*Tin(1,1)*Tin(2,1);
Powout(ii)=0.5*Tout(1,1)*Tout(2,1);
end
loss=-10*log10(Powout./Powin);
set(handles.text1,'string',num2str(loss));
guidata(hObject, handles);
assignin('base','loss',loss);
Here TR1, TR2,TR3 are the output of children GUIDE but output loss is like 85.855201026000510 - 6.821834035544766i in <1x1000 double>, which is the only last value of 'loss' when I did the process in only single GUIDE interface.
Please if any one have any idea give me its very urgent for me. Advancely Thanks
  2 Comments

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!