Borrar filtros
Borrar filtros

Bug: size(I, 1)*size(I, 2) returns size(I, 1) Instead of Product

1 visualización (últimos 30 días)
Apoorva Srivastava
Apoorva Srivastava el 24 de Jun. de 2019
Respondida: Steven Lord el 24 de Jun. de 2019
I = imread('image.png');
Why does
size(I, 1)*size(I, 2)
return the value of size(I, 1) instead of the product? It gives the product if I do
a = size(I, 1);
b = size(I, 2);
a*b

Respuestas (1)

Steven Lord
Steven Lord el 24 de Jun. de 2019
This works for me. Let's make sure you haven't overloaded the size function. What does this command return?
which -all size
Also check if the variable I has size 1 in the second dimension.

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by