oermens
Advanced Member level 2
matlab num2str engineering
I have taken phase noise data from Cadence and plotted it in Matlab, but when I add datacursors the values are written in scientific notation, i.e. 300kHz is written as 3.000e005 Hz. I've modified the code for datatip display a little bit myself just to show the units, but other than that I don't know what to do. this is my code:
i found this script called num2eng but i dont know hwo to add it to the existing data cursor code:
https://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=13168&objectType=File
anyone have suggestions?
I have taken phase noise data from Cadence and plotted it in Matlab, but when I add datacursors the values are written in scientific notation, i.e. 300kHz is written as 3.000e005 Hz. I've modified the code for datatip display a little bit myself just to show the units, but other than that I don't know what to do. this is my code:
Code:
pos = get(event_obj,'Position');
output_txt = {['Frequency: ',num2str(pos(1),3),' Hz'],...
['Phase Noise: ',num2str(pos(2),4),' dBc/Hz']};
i found this script called num2eng but i dont know hwo to add it to the existing data cursor code:
https://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=13168&objectType=File
anyone have suggestions?