awesome tutorial as always i have a question about app designer. i want to have a matrix like: a = [3,5,9] but I don't know how i can import it in app designer. i can't use numeric edit field and if i use text one then I can't do calculations on it. i tried to enter it as string like [3,5,9] to then convert it to double?! anyway that didn't work out for me. i don't know why we have (mat2str) but we don't have str2mat :)) thanks for your helps
@BenitoSebastian4 жыл бұрын
Hi Amir, Thanks for commenting. So I would recommend the following to do what you are trying to do: 1. Use a text edit field and if you are entering a row vector make sure you have a standard format, so for example to keep things simple you would have to enter [1,1,1] without the brackets like this 1,1,1. If you put the brackets, then you would have to write additional code to remove that in the following steps. 2. Now in the call back function you can use the following code: % First Text edit field input = app.EditField.Value; % reads in the value from first edit field as a string % Removing the commas using strsplit function convertedRowVector =str2double(strsplit(input,',')); % picks out the numbers and converts it to a row vector of data type double % Second numeric edit field app.EditField2.Value = convertedRowVector(1); % now you can select the values inside the row vector and display it or use for calculation Now if you want to input matrices for example then you will have to do some additional work to construct a matrix by separating the semi colons as well. Have a look strsplit function on the matlab website (link below), it will help you. uk.mathworks.com/help/matlab/ref/strsplit.html All the best!
@ericjose3764 жыл бұрын
Hello Benito! Your tutorials are pretty good and have helped me a lot! I'd like to ask you about AppDesigner. Is it possible to switch from a Edit Field (Numeric) to a Drop Down according to a selection on another Drop Down? For example: If DropDown 1 stands for option A, then an Edit Field (Numeric) is shown to be filled. If DropDown 1 stands for option B, then another Drop Down is shown for the user choose among its option. I've had difficulty trying to do that because the tool hasn't allowed me to edit its default script.
@maltekleeblatt49974 жыл бұрын
Hey i have a question to the Ui.Table within the app designer. I have to rows in my table and i want to make the second row editible. I hope you can help me.
@sayalijadhav87873 жыл бұрын
When I enter Zero it displays as 0 not as θ. I want to put y(θ)=1 How to use display zero as θ?