Mesh and Line Graph from CSV File
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Charan Jadigam
el 3 de Mzo. de 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 comentarios
Ver también
Categorías
Más información sobre Polygons en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!