How to extract the Y data value from the all X value required in the plotted 2D graph in an array?
1 次查看(过去 30 天)
显示 更早的评论
Hi all,
I have a graph plotting Y(BER value) vs X(SNR) value in 2D plot graph. I want to extract all the value of Y against its value of X in an array. anyone can help me please?
i have the code as below =============================================================================
BER2 = sum(total_bit_error)/(length(data)*iteration); figure; % BER vs SNR in linear value
hold on
plot(snr,BER,'gx-',snr,BER1,'bs-',snr,BER2,'ro-');
yticks = (0 : 0.01 :0.8);
xticks = (0 : 1 : 25);
set(gca,'YTick', yticks, 'YTickLabel', cellstr(num2str(yticks(:))) )
set(gca,'XTick', xticks, 'XTickLabel', cellstr(num2str(xticks(:))) )
grid on
xlabel('\fontname{calibri}{SNR}')
ylabel('\fontname{calibri}{BER}')
title('\fontsize{10}{BER vs SNR }')
legend('1','11','3')
0 个评论
回答(1 个)
Image Analyst
2013-3-25
I don't understand -- what is there to extract? And extract from what? Extract all Y? But you already have all Y in the variable called BER, and you already have all the X in the variable called SNR. So what else do you need?
2 个评论
Image Analyst
2013-3-27
I still don't understand. Anything that you plotted, you have the variables for. So just put those variables into a table (I don't know if that is a 2D matrix, something displayed on a GUI, or a uicontrol that is like a spreadsheet).
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!