I got the problem is like that here every time in calcultion T1,T2,T3 have fixed value from workspace but I need to calculte for 1000 times but what should be the code for this case can any body help me its really urgent for me
Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
How to get all the values of array
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (0)
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!