Help with using a matrix as an input with the GUI

2 views (last 30 days)
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?

Accepted Answer

Image Analyst
Image Analyst on 25 Nov 2015
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);

More Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!