Mesh and Line Graph from CSV File
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hello!
I'm trying to create both a mesh and a line graph from a .csv file. However, I am running into two errors- an error with the "colon operands must be real scalars" and that the "character vector is not terminated properly". Any help to fix these two errors would be greatly appreciated.
tot=imread('SUM_Test59_Top_Reslice.tif');
x = (1:1988)*1.3;
y = (1:2160)*1.3;
L1=tot*1.3;
mesh(y,x,L1);
colormap;
caxis([]);
xlabel('length[um]');
ylabel('length[um]');
xlim([0 max(x)])
ylim([0 max(y)])
m1=sum(L1(1:2160,:,'));
plot(m1);
0 Commenti
Risposte (1)
Charan Jadigam
il 3 Mar 2020
Hi,
I can see you are passing into ‘mesh’ data with different sizes, this would cause ‘Data dimensions must agree’ error.
The errors occur because of extra character in the m1=sum(L1(1:2160,:,')); statement. While calculating m1 using L1, the correct way of indexing would be,
m1=sum(L1(1:2160,:,:));
0 Commenti
Vedere anche
Categorie
Scopri di più su Surface and Mesh Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!