Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

MATLAB - Datacursors display Engineering Notation?

Status
Not open for further replies.

oermens

Advanced Member level 2
Joined
Nov 19, 2005
Messages
525
Helped
107
Reputation
220
Reaction score
44
Trophy points
1,308
Location
canada
Activity points
3,988
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:

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?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top