Looping through array to assign values to titles
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
I want to create a plot that contains a plot of each value of U_det and want each line assigned to each value in the array 'lateral'.
Now I have 5 different plots with the whole array in the legend.
Any ideas how to accomplish this?
Thanks
for i = abs(1:20:size(Bz,1))
Yi = Bz(i,minK(1,1));
lateral_1 = abs(RZ(:,1:49:245));%100.*find_coordinate(R2,Z2,Bz,0,Bi); % 100*: from [m] to [cm]
lateral = fliplr(lateral_1);
M_tot_spions_z = langevinfunc2(n,Kb,T,Brex(i,minK(1,1)), f, Vc, Ms,N);
U_det_r = abs((Yi.*M_tot_spions_z)/100e-9); % Counts 100[nV] Induced voltage [V]
figure;
txt = ['X=', num2str(lateral)];
plot(T_comb,U_det_r, 'DisplayName', txt)
% title([' Detected signal @ depth distance = ', num2str(abs(depth)),' [cm]'])
xlabel('Time [s]')
ylabel('Counts 100[nV]')
hold on
plot(T_comb, Noise)
legend show
end
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Legend 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!