tables, searching and working with data is the core of engineering apps never seen something so more dedicated to working with data in guis, keep it up
Like you're series very much. Wish they had been available many years ago. Tip for deleting array rows or columns and still using loops. Count backwards instead of forward and you can leave out the 'k' counting variable. E.g.- fAge = app.FilterAgeEditField.Value; nRows = size(app.UITable.Data,1); for i=nRows:-1:1 if app.UITable.Data(i,2) > fAge app.UITable.Data(i,:) = []; end end A more elegant method is to use vectorization. E.g. - fAge = app.FilterAgeEditField.Value; % Create a boolean vector array % index that matches size,1 of table idx = app.UITable.Data(:,2) > fAge; % Use index to select/delete all rows % greater than the age criteria. app.UITable.Data(idx,:) = [];
Thanks for explaining even the subtle things like curly/square brackets as you go along. A lot of videos gloss over those details, but they are great to know while building a good foundation
Hey Sebastian I really really appreciate that you made a video to answer our questions. I can't thank you enough for all the useful information that you have given and I am able to finish my final year project because of you. Keep doing what you're doing, you're the best! Will continue to support your channel! :)
Hey Samuel, I am really happy to hear that! I am glad I could help you in time. Please share my channel with you friends and colleagues.Thank you and all the best!
I got a question Benito, for the k=k+1 part, after the row of Milner is looped, k will be 4 by then, but the number of rows to be deleted is only three (the matrix of of RowstoDel is a 1x3 matrix). So that means even though we want matlab to create a 1X4 matrix but if we do not put in a value into the fourth column, matlab will automatically ignore the fourth column and produce a 1X3 matrix?
@@enguantan9926 So after Matlab adds 4 (Milner's row number) to the 3rd column in the RowstoDel vector, it will increment k. The value of k is now 4 however, a 4th column is only added to the RowstoDel vector only when the if condition is satisfied again. This means when we get to Row 5 (James) we skip adding the 4th column to the RowstoDel row vector because the if condition is not satisfied. Does that make sense?
This is a great series, Benito! I've learned a fair bit about AppDesigner so thank you for your generosity. Can I suggest though that you re-label the Min Age to Max Age? (... presumably the minimum age would remove people from the list who are younger than the minimum.)
Hi Bruce, Thankyou for the feedback, I am very glad to hear my videos were helpful. You are correct about my wording, I should have used Max age (apologies) but hopefully my explanation should avoid any confusion. Thanks, Benito
Hi Benito. As always, nice and clear explanation. Can you please explain how we can make a gauge run automatically " linked the gauge to my Simulink model "?
Hey Your videos have been very helpful. Could please make a video on multiple window applications? That would be very helpful for future use. Hope you see this.
Hi Benito. As always, nice and clear explanation. Another way to make the first code work, is that you can use decrement instead of increment like this. It will solve the problem at 4:45 for i = numrows:-1:1
Hi Benito! Your videos really help me a lot! Could you made a video about DropDown component in APP DESIGNER? When you select different item in dropDown component, the different file could be uploaded.
Hi Benito, Thank you for these videos, they are very helpful. Could you add a video on how to add a column of checkboxes? For example, if you take the average of all the ages and that gives you a result but unchecking a row removes players age from the average, thus recalculating. Would be much appreciated. Thank you! By the way, are you a Liverpool fan?
I would love to know how to delaete data from table multiple times. I mean filtr the data again anad again without error. Thanks you very much for your work. I love your content.
I appreciate your effort in making things simple. I have one question. when I try to filter the max age of the table. The system thows error "Unrecognized function or variable 'RowstoDel'." How to tackle with errors like this. Once again thanks for creating contents like this.
Thanks Benito for creating such detailed and useful Tutorials. Would you be able to create a Tutorial/comment on how to read one or more than one .m files in the AppDesigner? In addition, could you show/comment how user inputs in AppDesigner can be passed into an .m file? Thank you.
Hi Alborz, Thanks for commenting. You can read in a function from an m file by simply copying in the function name from the script file. But just make sure you have app as one of you inputs in the function defined in matlab. For example: function [f] = newtonslaw(app,m,a) You can then call this function in any of your call backs.
Benito you could have used deleterows=[deleterows i] to append instead of using another variable k.Also I think logical indexing would have avoided the loop as well..
Hey Benito, thank you for all your video tutorials, they have been very helpful. I was wondering whether you have an example for multiple windows applications, I have to create one but do not have any idea of how to do it. I would really appreciate if you can post a video about it or just send me an example of one. Regards
Hi Pablo, Sorry for the late reply. I will be releasing a video on this very soon. Meanwhile you can have a look at this example : uk.mathworks.com/help/matlab/creating_guis/multiwindow-app-gui-in-app-designer.html
Hi! :) I understood everything in this video until you began to add the letter k. Woudnt it be much easier to use a while loop for looping through the whole table..?
I appreciate that you made this video. I have a problem if app.UITable.Data{i,2} > filterAge ("Undefined function 'gt' for input arguments of type 'cell'.") RowstoDel(1,k) = i; k = k +1; I don't know how can I solve this one. Please help me to answer. Thanks a lot
Hello Benito! Your tutorials are very helpful and I was wondering if you could help me with a problem I'm running into. How do you graph the filtered data from a table? It's for a project and we have all the data on one graph and one table but then we are supposed to separately graph data that has been filtered from a loop callback. Thank You!
Thanks for the video. My only question for you is how do you filter a table the same way when it is not numbers but text. I created a database where the user can search and add to a table with numbers and text. I have it working perfectly to filter numeric the same way you just showed, but I can not get the text filter to work right. Ex. If in the search box they enter a part number which contains numbers and letters (CA4820348239BTL) the only rows left are the ones that satisfy the search input. I have been looking all over for this answer if you could help me i would greatly appreciate it. Thanks for your help.
Hello, thanks for sharing this information I have a question, how can I make the table in the app editable, and when the user changes the data in the table it automatically is saved when the second time the user opens the app?
Hi Zhina, You can use the writetable function to update existing values in an excel sheet and then you can load it up on the startup function. Here is a link to the function: uk.mathworks.com/help/matlab/ref/writetable.html All the best!
Hello Benito!! How about filtering names instead of numbers? I'm trying to do it, but I've got an error (undefined function 'ne' for input arguments of type 'cell') My idea is to filter the names that are not repeated Undefined function 'ne' for input arguments of type 'cell'. Undefined function 'ne' for input arguments of type 'cell'. Undefined function 'ne' for input arguments of type 'cell'.
Hey Benito, great video btw, can you help me out? I need to change the format of the numbers in my UItable, but i dont know how, I dont wanna mess with the existing code, of the App, is there a way to change that ?
Hello, thanks for sharing your knowledge, not so many people do that. I would like to have a question, when I use your code it sayes Undefined function or variable 'RowstoDel'. How is this possible?
@anass jr I figured out what to do. I need to convert filterAge from char array to num so I used str2num and now its work. But I don't understand why I must to do, while in video not.
Hi sir I have a I am using the GUI program in MatLab so I have to design an RLC circuit so when the user enters the value of R, L and C right but I have to how It displays the type of filter it is (low pass, high pass, etc.) for will be the code for that? can you help thank you
Hi sir can you please suggest how can i save the uitable data in Excel format in MATLAB app designer by clicking save button and how to update the data by run the application save again to same exel file . Please suggest as early as possible . Thank you !
Hello, Benito. I hope you doing very well. Benito, I have a problem with the Table component in app designer. I cannot display information after filtering. When I use the command app.UITable.Data after filtering, the table turn empty and doesn't display any information. I don't know if it's possible because the MATLAB version. I'm using R2021a and maybe has modifications. ¿Do you know how to solve this problem?
How about only filtering the "view" of the table, not actually deleting the rows... I don't want to lose any of the original data, e.g. the user can filter ages > 23, then type in 25 and see players with age > 25 instead, without having to read in the source data again.
tables, searching and working with data is the core of engineering apps never seen something so more dedicated to working with data in guis, keep it up
Like you're series very much. Wish they had been available many years ago.
Tip for deleting array rows or columns and still using loops. Count backwards instead of forward and you can leave out the 'k' counting variable. E.g.-
fAge = app.FilterAgeEditField.Value;
nRows = size(app.UITable.Data,1);
for i=nRows:-1:1
if app.UITable.Data(i,2) > fAge
app.UITable.Data(i,:) = [];
end
end
A more elegant method is to use vectorization. E.g. -
fAge = app.FilterAgeEditField.Value;
% Create a boolean vector array
% index that matches size,1 of table
idx = app.UITable.Data(:,2) > fAge;
% Use index to select/delete all rows
% greater than the age criteria.
app.UITable.Data(idx,:) = [];
Thanks for explaining even the subtle things like curly/square brackets as you go along. A lot of videos gloss over those details, but they are great to know while building a good foundation
Thank you for sharing your knowledge, it has been very helpful!
You are a great teacher! Thank you very much Benito!
Grrrrwwwwwweat job with the entire series. This is such a precise and concise dissemination of knowledge. Helpful Tips.
Hey Sebastian I really really appreciate that you made a video to answer our questions. I can't thank you enough for all the useful information that you have given and I am able to finish my final year project because of you. Keep doing what you're doing, you're the best! Will continue to support your channel! :)
Hey Samuel,
I am really happy to hear that! I am glad I could help you in time. Please share my channel with you friends and colleagues.Thank you and all the best!
I got a question Benito, for the k=k+1 part, after the row of Milner is looped, k will be 4 by then, but the number of rows to be deleted is only three (the matrix of of RowstoDel is a 1x3 matrix). So that means even though we want matlab to create a 1X4 matrix but if we do not put in a value into the fourth column, matlab will automatically ignore the fourth column and produce a 1X3 matrix?
@@BenitoSebastian Sure thing! :D
@@enguantan9926 So after Matlab adds 4 (Milner's row number) to the 3rd column in the RowstoDel vector, it will increment k. The value of k is now 4 however, a 4th column is only added to the RowstoDel vector only when the if condition is satisfied again. This means when we get to Row 5 (James) we skip adding the 4th column to the RowstoDel row vector because the if condition is not satisfied. Does that make sense?
@@BenitoSebastian Alright, got it, thank you!! :D
This is a great series, Benito! I've learned a fair bit about AppDesigner so thank you for your generosity. Can I suggest though that you re-label the Min Age to Max Age? (... presumably the minimum age would remove people from the list who are younger than the minimum.)
Hi Bruce,
Thankyou for the feedback, I am very glad to hear my videos were helpful. You are correct about my wording, I should have used Max age (apologies) but hopefully my explanation should avoid any confusion.
Thanks,
Benito
Hi Benito. As always, nice and clear explanation. Can you please explain how we can make a gauge run automatically " linked the gauge to my Simulink model "?
Hey
Your videos have been very helpful. Could please make a video on multiple window applications? That would be very helpful for future use. Hope you see this.
Hi Benito. As always, nice and clear explanation. Another way to make the first code work, is that you can use decrement instead of increment like this. It will solve the problem at 4:45
for i = numrows:-1:1
Wow that's really smart thank you
Benito Sebastian, Thank you very much! your videos are very clear and easy to follow keep going bro good job!
Thank Nguse for commenting, subscribe to my channel if you already haven't. Thank you! :)
Thank you. Please do more app designer tutorials
Hi Benito! Your videos really help me a lot! Could you made a video about DropDown component in APP DESIGNER? When you select different item in dropDown component, the different file could be uploaded.
Hi Benito,
Thank you for these videos, they are very helpful. Could you add a video on how to add a column of checkboxes? For example, if you take the average of all the ages and that gives you a result but unchecking a row removes players age from the average, thus recalculating. Would be much appreciated.
Thank you!
By the way, are you a Liverpool fan?
I would love to know how to delaete data from table multiple times. I mean filtr the data again anad again without error.
Thanks you very much for your work. I love your content.
I appreciate your effort in making things simple. I have one question. when I try to filter the max age of the table. The system thows error "Unrecognized function or variable 'RowstoDel'." How to tackle with errors like this. Once again thanks for creating contents like this.
You have the best videos on matlab app design, it's easy to follow through. Keep up the good work
Thanks Keston! Hope this video helped you to solve the problems you had.
Thanks Benito for creating such detailed and useful Tutorials. Would you be able to create a Tutorial/comment on how to read one or more than one .m files in the AppDesigner? In addition, could you show/comment how user inputs in AppDesigner can be passed into an .m file? Thank you.
Hi Alborz,
Thanks for commenting. You can read in a function from an m file by simply copying in the function name from the script file. But just make sure you have app as one of you inputs in the function defined in matlab. For example:
function [f] = newtonslaw(app,m,a)
You can then call this function in any of your call backs.
Benito you could have used deleterows=[deleterows i] to append instead of using another variable k.Also I think logical indexing would have avoided the loop as well..
Thanks for the knowledge.. After applying desired filters to multiple variables on the table How do you extract the new reduced table ??
Hey Benito, thank you for all your video tutorials, they have been very helpful. I was wondering whether you have an example for multiple windows applications, I have to create one but do not have any idea of how to do it. I would really appreciate if you can post a video about it or just send me an example of one. Regards
Hi Pablo,
Sorry for the late reply. I will be releasing a video on this very soon. Meanwhile you can have a look at this example : uk.mathworks.com/help/matlab/creating_guis/multiwindow-app-gui-in-app-designer.html
Hi! :) I understood everything in this video until you began to add the letter k. Woudnt it be much easier to use a while loop for looping through the whole table..?
Hi Benito Sebastian :) Could You please create tutorial about multi window apps? And another idea to use @functions for UI graphs plotting :)
Sure, thanks for the suggestion!
I appreciate that you made this video. I have a problem
if app.UITable.Data{i,2} > filterAge
("Undefined function 'gt' for input arguments of type 'cell'.")
RowstoDel(1,k) = i;
k = k +1;
I don't know how can I solve this one. Please help me to answer.
Thanks a lot
Hello Benito! Your tutorials are very helpful and I was wondering if you could help me with a problem I'm running into. How do you graph the filtered data from a table? It's for a project and we have all the data on one graph and one table but then we are supposed to separately graph data that has been filtered from a loop callback. Thank You!
Thanks for the video. My only question for you is how do you filter a table the same way when it is not numbers but text. I created a database where the user can search and add to a table with numbers and text. I have it working perfectly to filter numeric the same way you just showed, but I can not get the text filter to work right. Ex. If in the search box they enter a part number which contains numbers and letters (CA4820348239BTL) the only rows left are the ones that satisfy the search input. I have been looking all over for this answer if you could help me i would greatly appreciate it. Thanks for your help.
Hello, thanks for sharing this information I have a question, how can I make the table in the app editable, and when the user changes the data in the table it automatically is saved when the second time the user opens the app?
Hi Zhina,
You can use the writetable function to update existing values in an excel sheet and then you can load it up on the startup function.
Here is a link to the function:
uk.mathworks.com/help/matlab/ref/writetable.html
All the best!
Hello Benito!! How about filtering names instead of numbers? I'm trying to do it, but I've got an error (undefined function 'ne' for input arguments of type 'cell') My idea is to filter the names that are not repeated
Undefined function 'ne' for input arguments of type 'cell'.
Undefined function 'ne' for input arguments of type 'cell'.
Undefined function 'ne' for input arguments of type 'cell'.
Hey Benito, great video btw, can you help me out? I need to change the format of the numbers in my UItable, but i dont know how, I dont wanna mess with the existing code, of the App, is there a way to change that ?
Hey Orlando,
What format are you trying to put it in? If you are trying reduce the number of decimal places, you can use round() function for example.
Benito Sebastian im trying to add decimals and remove scientific notation I think app.UITable.ColumnFormat works
@@orlandob8182 To add decimals you can use the function > format long.
Hello, thanks for sharing your knowledge, not so many people do that. I would like to have a question, when I use your code it sayes Undefined function or variable 'RowstoDel'. How is this possible?
@anass jr I figured out what to do. I need to convert filterAge from char array to num so I used str2num and now its work. But I don't understand why I must to do, while in video not.
Hi sir I have a
I am using the GUI program in MatLab so I have to design an RLC circuit so when the user enters the value of R, L and C right but I have to how It displays the type of filter it is (low pass, high pass, etc.) for will be the code for that? can you help
thank you
Hi sir can you please suggest how can i save the uitable data in Excel format in MATLAB app designer by clicking save button and how to update the data by run the application save again to same exel file .
Please suggest as early as possible .
Thank you !
Because I have tried many times but not getting me
Hello, Benito. I hope you doing very well.
Benito, I have a problem with the Table component in app designer. I cannot display information after filtering. When I use the command app.UITable.Data after filtering, the table turn empty and doesn't display any information. I don't know if it's possible because the MATLAB version. I'm using R2021a and maybe has modifications.
¿Do you know how to solve this problem?
you can use :
data=data(data.Age>45,:);
This method is much better and more efficient
How about only filtering the "view" of the table, not actually deleting the rows... I don't want to lose any of the original data, e.g. the user can filter ages > 23, then type in 25 and see players with age > 25 instead, without having to read in the source data again.
Painful