Help with using a matrix as an input with the GUI

2 次查看(过去 30 天)
Hello, I need help getting an input from my GUI apparently if I use the following line it says that I am using too many input parameters
A=str2double(get(handles.input1), 'string');
thats how its supposed to be, but if I enter the matrix: 1 0;1 1;0 1 it gives me an error message, should I make the input between brackets or parenthesis?

采纳的回答

Image Analyst
Image Analyst 2015-11-25
You have the right parenthesis in the wrong place. Why don't we make it clearer by doing it in two steps:
editFieldContents = get(handles.input1, 'string');
A = str2double(editFieldContents);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by