Analyzing Atomic Force Microscope data using MATLAB
20 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Alexander Link
am 7 Mär. 2019
Beantwortet: Alexander Link
am 10 Mär. 2019
I am pretty new to MATLAB and only know some basic functions of the program. I have a 512x512 excel sheet that is height data from a section of surface the size of 20micometerX20micrometer. I am trying to input this data in to matlab and create a 2D and 3D plot of the data. I can input the data from excel and use the data to create a 'z' variable. What im struggling with is defining the x and y variable for the 3d plot and the x variable for the 2D plot. Please let me know if you believe you can help me!
0 Kommentare
Akzeptierte Antwort
KSSV
am 7 Mär. 2019
[num,txt,raw] = xlsread(myfile) ;
[ny,nx] = size(num) ;
L = 20 ; % micrometer
B = 20 ; % micrometer
x = linspace(0,L,nx) ;
y = linspace(0,B,ny) ;
[X,Y] = meshgrid(x,y) ;
figure(1)
pcolor(X,Y,num) ;
figure(2)
surf(X,Y,num) ;
3 Kommentare
KSSV
am 7 Mär. 2019
I am reading data from excel file using xlsread. num gives numbers from excel data, txt gives you text data if any in excel file. raw gives you both text data nd number data as it exists in excel file. Read about xlsread.
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Annotations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!