As can be seen in the figure below, the plot command gives us a graph of Sound Power(dB) Vs Frequency for different surfaces. I am required to add a second axis to the below plot such that the x-axis also includes the 'rpm'. I have a vector of 'rpm's' for all the frequencies. rpm and frequency are related. rpm = frequency/(time order*60). Currently my x-axis contains only the frequency. How can I add a second axis(rpm's) without crowding the current x axis(frequency)? Here is the code which I am using..
ord(y1).freq = transpose(ord(y1).dat(1,:)); ord(y1).rpm = ord(y1).freq/ord1(y1)*60; ord(y1).total_lw = transpose(ord(y1).dat(2,:)); ord(y1).lw = transpose(ord(y1).dat(3,:)); ord(y1).lw2 = transpose(ord(y1).dat(4,:)); ord(y1).lw3 = transpose(ord(y1).dat(5,:)); figure; % Plot for frequency and sound power
x = ord(y1).freq; z1 = ord(y1).lw; z2 = ord(y1).lw2; z3 = ord(y1).lw3; z4 = ord(y1).total_lw; plot(x,z1,x,z2,x,z3,x,z4,'--','Linewidth',1.5); title(sprintf('%s for the time order %d',Method, ord1(y1)),'FontSize',16,'Fontweight','bold'); grid on xlabel('Frequency Hz','FontSize',12,'Fontweight','bold'); ylabel('Schallleistung dB','FontSize',12,'Fontweight','bold'); legend('Surface1','Surface2','Surface3','Total Surface','location','southeast');
Thank you in advance!
Best Answer