error using msg box

3 次查看(过去 30 天)
kash
kash 2012-4-6
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

采纳的回答

Davide Ferraro
Davide Ferraro 2012-4-6
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)))

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Type Conversion 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by