Pinning a Particular Value to a Matlab Plot
3 次查看(过去 30 天)
显示 更早的评论
I have the following results in Matlab and I want to plot them over frequency
The frequency range from 2-9GHz
2.00E+09 3.00E+09 4.00E+09 5.00E+09 6.00E+09 7.00E+09 8.00E+09 9.00E+09
Some of the E-Field values are as follows
0.084413291 0.082622802 0.080392527 0.077424061 0.073389164 0.067507708 0.05822189 0.04197535
The frequencies will go on the X-Axis with the Electric Field Values on Y. The plot will ahve many different ranges of E Field Values.
How can I do this in Matlab? I have done many plots before but not where I have had to put a particular label on an axis
So essentially, I want to plot fequency vs amplitude for many values over different frequencies on the same graph
回答(1 个)
Jan
2012-8-19
Perhaps this helps to solve "_The plot will have many different ranges of E Field Values_":
x = [2.00E+09, 3.00E+09, 4.00E+09, 5.00E+09, 6.00E+09. 7.00E+09, 8.00E+09, 9.00E+09];
y = [0.084413291, 0.082622802, 0.080392527, 0.077424061, 0.073389164, 0.067507708, 0.05822189, 0.04197535];
z = y + 0.1;
axes('NextPlot', 'add'); % Equivalent to "hold('on')"
plot(x, y, 'r');
plot(x, z, 'g');
But what is the problem with the labels?
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!