MATLAB AppDesigner | Tutorial 19 | Searching and Filtering data in a table

  Рет қаралды 23,774

Benito Sebastian

Benito Sebastian

Күн бұрын

☑️ In this video:
0:07 Introduction
0:36 What we did in the previous tutorial
1:11 Adding a filter button
11:50 Completed filter app
▶️ If you are finding my videos helpful please leave a like and subscribe to my channel.
If you have any questions or topics that you are interested to learn about, let me know in the comments or on my discussion page : www.youtube.co....
⏭️ In the upcoming videos I'll teach how to use all the components in components library and how to connect AppDesigner to Simulink.
✉️ Get in touch:
If you do need some one to one support, feel free to drop an email via my contact page on my website. I will try my best to get back to you.
Thanks for watching everyone!

Пікірлер: 55
@user-gi6hl1jc1q
@user-gi6hl1jc1q 4 жыл бұрын
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,:) = [];
@CarlosRodriguez-xk9ot
@CarlosRodriguez-xk9ot 2 жыл бұрын
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
@enguantan9926
@enguantan9926 4 жыл бұрын
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! :)
@BenitoSebastian
@BenitoSebastian 4 жыл бұрын
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!
@enguantan9926
@enguantan9926 4 жыл бұрын
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
@enguantan9926 4 жыл бұрын
@@BenitoSebastian Sure thing! :D
@BenitoSebastian
@BenitoSebastian 4 жыл бұрын
@@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?
@enguantan9926
@enguantan9926 4 жыл бұрын
@@BenitoSebastian Alright, got it, thank you!! :D
@sarahadamo3677
@sarahadamo3677 4 жыл бұрын
Thank you for sharing your knowledge, it has been very helpful!
@cleydsonadller4802
@cleydsonadller4802 4 жыл бұрын
You are a great teacher! Thank you very much Benito!
@werferrios1540
@werferrios1540 4 жыл бұрын
Grrrrwwwwwweat job with the entire series. This is such a precise and concise dissemination of knowledge. Helpful Tips.
@slapshot269
@slapshot269 4 жыл бұрын
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
@brucedickson6019
@brucedickson6019 4 жыл бұрын
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.)
@BenitoSebastian
@BenitoSebastian 4 жыл бұрын
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
@zainalabidin9171
@zainalabidin9171 3 жыл бұрын
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
@thanismurugathas2929
@thanismurugathas2929 11 ай бұрын
Wow that's really smart thank you
@ngusemekonen8384
@ngusemekonen8384 4 жыл бұрын
Benito Sebastian, Thank you very much! your videos are very clear and easy to follow keep going bro good job!
@BenitoSebastian
@BenitoSebastian 4 жыл бұрын
Thank Nguse for commenting, subscribe to my channel if you already haven't. Thank you! :)
@jean-pierregieryn5525
@jean-pierregieryn5525 Жыл бұрын
Thank you. Please do more app designer tutorials
@benha325
@benha325 4 жыл бұрын
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?
@jiajingli9765
@jiajingli9765 4 жыл бұрын
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.
@charalambosxydas2974
@charalambosxydas2974 4 жыл бұрын
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.
@alborzjelvani3316
@alborzjelvani3316 4 жыл бұрын
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.
@BenitoSebastian
@BenitoSebastian 4 жыл бұрын
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.
@kestonsmith1354
@kestonsmith1354 4 жыл бұрын
You have the best videos on matlab app design, it's easy to follow through. Keep up the good work
@BenitoSebastian
@BenitoSebastian 4 жыл бұрын
Thanks Keston! Hope this video helped you to solve the problems you had.
@ZdeněkFrána
@ZdeněkFrána 11 ай бұрын
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.
@OMARELMZOURI-d2l
@OMARELMZOURI-d2l Жыл бұрын
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 "?
@dominicbrindanp9459
@dominicbrindanp9459 Жыл бұрын
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.
@vinodmariyachar4669
@vinodmariyachar4669 2 жыл бұрын
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..
@pablodelgad2
@pablodelgad2 4 жыл бұрын
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
@BenitoSebastian
@BenitoSebastian 4 жыл бұрын
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
@silassamuel4738
@silassamuel4738 4 жыл бұрын
Thanks for the knowledge.. After applying desired filters to multiple variables on the table How do you extract the new reduced table ??
@muazmaali2996
@muazmaali2996 11 ай бұрын
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..?
@LonleyGuns
@LonleyGuns 4 жыл бұрын
Hi Benito Sebastian :) Could You please create tutorial about multi window apps? And another idea to use @functions for UI graphs plotting :)
@BenitoSebastian
@BenitoSebastian 4 жыл бұрын
Sure, thanks for the suggestion!
@ThangNguyen-jm1nn
@ThangNguyen-jm1nn 4 жыл бұрын
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
@Ashlaneo12
@Ashlaneo12 4 жыл бұрын
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!
@marklukas3613
@marklukas3613 3 жыл бұрын
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.
@zhinasedqi6213
@zhinasedqi6213 4 жыл бұрын
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?
@BenitoSebastian
@BenitoSebastian 4 жыл бұрын
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!
@quadriquadri1655
@quadriquadri1655 3 жыл бұрын
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
@cristian6234
@cristian6234 3 жыл бұрын
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?
@eidercasado5953
@eidercasado5953 4 жыл бұрын
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'.
@MissSarlot
@MissSarlot 4 жыл бұрын
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?
@MissSarlot
@MissSarlot 4 жыл бұрын
​@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.
@amirazadehranjbar6844
@amirazadehranjbar6844 2 жыл бұрын
you can use : data=data(data.Age>45,:); This method is much better and more efficient
@krutikgujarathi1554
@krutikgujarathi1554 3 жыл бұрын
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 !
@krutikgujarathi1554
@krutikgujarathi1554 3 жыл бұрын
Because I have tried many times but not getting me
@orlandob8182
@orlandob8182 4 жыл бұрын
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 ?
@BenitoSebastian
@BenitoSebastian 4 жыл бұрын
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.
@orlandob8182
@orlandob8182 4 жыл бұрын
Benito Sebastian im trying to add decimals and remove scientific notation I think app.UITable.ColumnFormat works
@BenitoSebastian
@BenitoSebastian 4 жыл бұрын
@@orlandob8182 To add decimals you can use the function > format long.
@mp9305
@mp9305 4 жыл бұрын
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.
@VerneKonig
@VerneKonig 5 ай бұрын
Painful
MATLAB for New Users
52:19
MATLAB
Рет қаралды 124 М.
💩Поу и Поулина ☠️МОЧАТ 😖Хмурых Тварей?!
00:34
Ной Анимация
Рет қаралды 1,5 МЛН
Bike Vs Tricycle Fast Challenge
00:43
Russo
Рет қаралды 26 МЛН
Остановили аттракцион из-за дочки!
00:42
Victoria Portfolio
Рет қаралды 3,2 МЛН
MATLAB AppDesigner  | Tutorial 17 | Using properties to add data to table
10:42
MATLAB AppDesigner | Tutorial 18 | Deleting Rows & Columns from Tables
8:57
Building MATLAB Apps with App Designer
28:31
MATLAB
Рет қаралды 98 М.
Day in the Life of a Data Analyst - SurveyMonkey Data Transformation
1:17:14
Shashank Kalanithi
Рет қаралды 3,5 МЛН
What La Niña Will do to Earth in 2025
19:03
Astrum
Рет қаралды 541 М.
Tables in MATLAB - Everything You Need to Know | MATLAB Tutorial
10:44
How I'd Learn Data Analytics in 2024 (If I Had to Start Over)
14:08
CareerFoundry
Рет қаралды 803 М.
💩Поу и Поулина ☠️МОЧАТ 😖Хмурых Тварей?!
00:34
Ной Анимация
Рет қаралды 1,5 МЛН