Hi Benito - great tutorials. For reference, my version (2018a) kicks out an error if I use 'x Data' in the t.Properties.VariableNames{1} cell. 'x_Data' is completely fine, so it seems that this version does not permit spaces in the table content. Odd but it is Matlab...
Hi Bruce, Thanks for pointing this out, I have pinned your comment to the top anyone who is experiencing the same issue can see it first. Thank you once again.
Not sure if you guys gives a shit but if you are bored like me during the covid times then you can watch pretty much all the new movies and series on instaflixxer. Have been binge watching with my brother recently xD
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 "?
Hi ! In app designer, using a push button, I want to run a .m file (containing some variables ) and want to load them in workspace. In callback of Push button, what code should I write ?? please help
hi Benito, i have a question. I have a Data in a table and i m using an if to find a value, so im using if v(1,1)==72, c=13 end and at the end i want to put the information in another table. But it appears "Undefined function 'eq' for input arguments of type 'table'.". I dont know what im doing wrong.
Hi Paula, I believe you are trying to loop through data in a table and check if it is equal to 72 and if it is then set c = 13. This requires a couple of steps and my next tutorial (19) will show you how to do this. Meanwhile check out my tutorial 18 where I show you how to apply a conditional statement on data in a table.
Hi Benito, I would like to know if there is any way to sort the data so that it is centered, because when I import the data, it is in the right part of the cell and I would like it to be centered. Greetings from Mexico
Hi Benito, can you please explain me how to display the Name of Excel file in MATLAB app designer... For eg : I created one edit field text area , one button and table. Now I'm clicking the button my Excel table is read in the ui table and also I want to display the name of the Excel into the edit field text area.
Hi Benito do you any idea why my matlab comes with errors when I'm using the readtable function. I have put the matlab script and the excel file in the same folder as each other as well and the matlab still generates an error. I am trying to get that data from the excel file into the matlab script and then plot a graph on matlab using the data afterwards trying to do the least squares method for a control module.
Hello. I would like to plot some data from a table. The first colum is the time (to plot in x axis) then i would like to plot 3 diferent data from table columns in y axis. I also would like to have the initial and final data (for x axes) picked from 2 data pickers and plot the graph after.... Is this possible=?? thank you in advanced.
I see that you can load an excel file if you have the name in but do you have the code that will allow me to pull up a directory and then load a file by clicking on it? Thank you.
Hi Benito. I have tried to change the value of 1 cell in a table and I don't seem to be able to do it. Seems you have to write the whole table at one time, you can't edit values in individual cells. What if you write to a table 3 rows by 3 cols, and you want to add a value to row 4, col 1 can you do it? I wish you could just write app.table.value(4,1) = newvalue; but this doesn't work. It's not really that user friendly. Another little thing is you can't justify the column names, it's always left justified.
Hi Ester, Matlab is probably the most user friendly coding package you can find, you just need to know how to define things correctly. To replace values in individual cells you need to do the following: >> % Based on the variables defined in this video tutorial >> t.x(1) = 99; % This will replace 1 in column 1 with 99 To add a new row of data you need to do the following: >> newrow = {'Benito', 185 , 10}; % New row should be defined as a cell array with curly brackets >> app.UITable.Data = [app.t;newrow]; % Then you need to add it to the previous table using concatenation This is a good question and I think many people are trying to do something similar.I will make a tutorial explaining how to do this properly. Look out for my next release!
Hi Benito I would like to thank you for your hard work. I am facing a problem if you can help me with it, I read data from excel to UITable using readtabel, then I want to add a drop down menu in column 4 (region) so the user can select the region then for each region selected in column 4 a corresponding value should appear in column 5. Lastly I want to multiply the value in column 5 with column 2 and display the value in column 6. I know its a bit complicated but is it possible to to so? I would appreciate the help.
Hi Benito, Best tutorials in the Matlab app designer series! Thank you for creating such good content. I seem to get the error 'Too many input arguments' when using readtable command. Any idea why this can happen? I've tried to find as many sources as possible. No solution.
Hi Benito, I have put in the code verbatim and I get the error: Error setting property 'Data' of class 'Table': (on line app.UITable.Data = t;) 1) I am using 2017B (on a MAC). 2) Created the data using excel (for a MAC) and stored. 3) Data stored in "t" looks fine in the Workspace Viewer. Searched the web, and no one appears to have run into this issue? Thanks for any help.
Hi Steven, What type of data are you trying to import? Some things to double check: 1. Make sure the capitals are used correctly. 2. Make sure the file is in the path 3. If none of these work you can try using xlsread as follows: t = xlsread("Book1.xlsx"); app.UITable.Data = t; All the best!
Hi Benito. I would like to define an editable 3*m matrix in app designer programmatically defined by users. Once defined the parameter m in an editable field (numeric), the app automatically generates an editable 3*m matrix. How can I do this?
Hi Gaetano, From what I understand, what you can do is the following: 1. Create 3x3 numerica edit fields 2. Create a variable i.e. m = [app.editfield11.Value app.editfield12.Value app.editfield13.Value; app.editfield21.Value .... .... ; app.editfield21.Value .... .... ]; I hope you get the idea. All the best!
I can see how to do this with excel from your example, but what about something similar for notepad? I want to design an app and do the following in order: 1. Either open notepad or some data entry box 2. Be able to input the data in the form of a matrix that matlab will read for variables 3. Be able to save the data to notepad. How would I do something like this?
First of all, I would like to thank you for your video. It's really easy for me to follow. But I am facing a problem " While setting property 'Data' of class 'Table': Data must be a numeric, logical, or cell array" how could I solve this?
Hi Benito, is it possible to only extract specific data from excel? Like for example I only want to extract those data with x values larger than 5 and leave out the rest, sort of like a data filter. If not, how can I do that using app designer?
Hi Samuel, I think the best way to do this is to import the data into app designer and then loop through the each row and remove the rows you don't need. Once this is done then display the data on a table. All the best!
@@BenitoSebastian Thank you so much Benito. Can I ask you for one more favour? I posted a question on Mathworks, could you please spend a little time to look through the question? This is my final year project and I've been stuck at this step for a very long time and I really dont know who to go to, the info about appdesigner that I can find on the internet is really limited. Really hope you can help me if you have the time:) Thanks again.
@@BenitoSebastian oops sorry I forgot! heres the link: www.mathworks.com/matlabcentral/answers/503844-is-it-possible-to-filter-out-some-rows-in-a-table-using-appdesigner-callbacks Thank you very much!
Hi Benito sir, actually while writing the same code for reading the data from the excel, its showing an error "unrecognised property 'data' for class 'matlab.ui.control.Table' Please help sir...
Hi Benito, first of all thanks for making very brief and precise videos! They are so helpful! I have a question: so I wanted to create a button to import data using a dialog box (where I can choose any file). The callback function of this button is supposed to save the file name, the path and load the data on the variable A. I used the code below. So, this opens the dialog box but I can only choose Matlab files (even after choosing the option "All files")... but what I really want is to import csv files... Do you know how to fix this? Thanks in advance. function ButtonPushed(app, event)
For anyone seeing my comment, I managed to do it by writing in the callback of the button: [filename, pathname]=uigetfile({'*.xlsx'},'File Selector'); text = readtable([pathname filename], "Sheet",1, 'ReadVariableNames',false); app.UITable.Data = text;