error using msg box

3 visualizaciones (últimos 30 días)
kash
kash el 6 de Abr. de 2012
NN=[21 25;20 26]
msgbox(['the value is ',num2str(NN)])
i get error as
Error using horzcat CAT arguments dimensions are not consistent.
Error in Untitled (line 26) msgbox(['the value is ',num2str(NN)])
please help

Respuesta aceptada

Davide Ferraro
Davide Ferraro el 6 de Abr. de 2012
You are trying to concatenate a vector (your text) with a matrix. The dimensions are not consistent. You can use the CHAR function to automatically add some spaces to build a full matrix:
msgbox(char('the value is ',num2str(NN)))

Más respuestas (0)

Categorías

Más información sobre Data Type Conversion en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by