MATLAB AppDesigner | Tutorial 15 | Reading and Plotting Data from Excel

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 พ.ย. 2024

ความคิดเห็น • 37

  • @brucedickson6019
    @brucedickson6019 4 ปีที่แล้ว +4

    Hi Benito - informative as always. I've found another weirdness of v2018a. You can't use double quotes when calling a column, so
    x = table2array(t(:,'x_Data'));
    works while
    x = table2array(t(:,"x_Data"));
    causes an error. Note also the (required) underscore which I commented on for Tutorial 14.

    • @BenitoSebastian
      @BenitoSebastian  4 ปีที่แล้ว

      Hi Bruce,
      Thankyou for pointing that out, it would certainly help a lot of people. I will see If I can add it as a note on top of the video. Cheers !

  • @ryanzhang3150
    @ryanzhang3150 5 ปีที่แล้ว +5

    I watched all 15 tutorials and really learned something! Thanks a lot! Your teaching is really clear and helpful, hope to see more tutorials from you

    • @BenitoSebastian
      @BenitoSebastian  5 ปีที่แล้ว

      Hi,
      Thank you for commenting. I am very happy to hear you have learned something new. I hope to release at least 2 tutorials every week. Please share my channel with your friends and colleagues. Thank you!

  • @carlbickford9110
    @carlbickford9110 4 ปีที่แล้ว +3

    Thank you very much for this content. I teach a basic MATLAB class to engineers (I'm not a programmer) and was familiar with GUIDE. This series easily got me to switch my mindset for App Designer. It is a significant improvement!

    • @BenitoSebastian
      @BenitoSebastian  4 ปีที่แล้ว

      Hi Carl,
      Thanks for commenting. I'm glad you found it useful! App Designer is certainly more easier than GUIDE in my opinion. All the best stay tuned for more!

  • @neetuprasad5755
    @neetuprasad5755 2 ปีที่แล้ว +1

    Hello Mr. Sebastian, Your tutorial are very helpful to lern app building in MATLAB. Thank you for that. It would be great if you could also teach how to make the table editable by user and plot the graph of the data fed by user in the table.

    • @Message-Today
      @Message-Today 2 ปีที่แล้ว

      I too have a the same query. Need to have a GUI which takes input from user (basically copy paste from excel) and plot graph in the matlab after doing data processing or some calculations

  • @DarkDevil-dn3ot
    @DarkDevil-dn3ot 3 ปีที่แล้ว

    pretty much helpful for the basics ❤️

  • @abdulkadirgozuoglu8946
    @abdulkadirgozuoglu8946 5 ปีที่แล้ว +1

    Thank you for all 15 tutorials.We are expecting App designer and Arduino applications. Such as transfer sampled array data from arduino and real time plot in app designer.

    • @BenitoSebastian
      @BenitoSebastian  5 ปีที่แล้ว +1

      Hi Abdulkadir,
      Thank you for your feedback once again. I hope to release an App Designer and a Matlab Video every week. Real time plots from a Simulink model will be coming very soon and I will also be releasing Arduino tutorials in the future. Stay tuned! Please share my channel with your friends and colleagues. The more subscribers and feedback, the more motivated I am to keep creating videos like this. Thank you!

  • @kingsleyokoli1
    @kingsleyokoli1 ปีที่แล้ว

    Thank you Benito

  • @abhishek_sengupta
    @abhishek_sengupta 4 ปีที่แล้ว

    Thanks !!

  • @abidemna4950
    @abidemna4950 3 ปีที่แล้ว

    Thank you so much it works perfectly, I was wonder how can I read constantly the table: always reading without the button ???, by the way, your series is my first source what great work !!

  • @fredecallesen7424
    @fredecallesen7424 5 ปีที่แล้ว +1

    Thank you Benito, nice tutorials, can you choose your excel file or txt file from app if yes, how ?

    • @BenitoSebastian
      @BenitoSebastian  5 ปีที่แล้ว +1

      Hi Frede,
      Thanks for your feedback. I will be releasing a video on how to choose your excel file using a browse button very soon. Stay tuned!

  • @rolanossi3275
    @rolanossi3275 3 ปีที่แล้ว

    Hello Benito,
    Perfect video as always.
    But how can I send the imported excel data from Appdesigner to a Simulink block and then plot the result?
    Thank you in advance.

  • @sadadreza5745
    @sadadreza5745 4 ปีที่แล้ว +1

    Can you tell how to do linear regression by taking data from an excel file in this app designer?

  • @pinak6padman
    @pinak6padman 4 ปีที่แล้ว

    Thank you for the amazing tutorial Benito. I was trying to plot a graph with 1 column of data for X axis and 2 columns of data for Y axis on the same graph. Could you please help me with the syntax? Thank you in advance.

  • @uriasdomingos5235
    @uriasdomingos5235 4 ปีที่แล้ว

    Hi Benito may you plz tell how can I take a value on the table(or imported from excel sheet) to make a simple calculation in app designer?

  • @fabioklingon6698
    @fabioklingon6698 4 ปีที่แล้ว

    Hey Benito, Great Work! I have a question where I couldn't find any answer.
    I want to read an huge excel table with lot of variables in app designer, then do some calculation with those variables and save them as a .mat file in the end.
    How can a read ALL the variables?
    Before (in my .m script) I was easily store it into a number and text cell and was using the assignin() command to put them into the workspace and save it as an mat.
    Thanks a lot!

  • @tahiramajeed3259
    @tahiramajeed3259 2 ปีที่แล้ว

    Hello! can you please make a tutorial about Histograms. how to draw 2-D histograms in app designer?

  • @bambiikiyo
    @bambiikiyo 5 ปีที่แล้ว +1

    Thank you for the tutorial ! May I know if it's possible to plot data from excel with just one column of y data and the number of rows is the x value ? I've tried to modify the code to x = 0:length(y) but it tells me "Error using plot
    . Vectors must be the same length"

    • @BenitoSebastian
      @BenitoSebastian  5 ปีที่แล้ว +1

      Hi Maggie,
      Thankyou for your comment. If you have 20 y values then you want 20 x values. To do this you have to define x = 1:length(y). If you do x = 0:length(y), you'll get 21 values including 0, this is why Matlab is saying vectors must be same length. Hope you understand the idea. Let me know if it works!

    • @bambiikiyo
      @bambiikiyo 5 ปีที่แล้ว +2

      Yes, it works ! Though the graph started to plot from 1 instead of 0, fixed it by changing the code to x = 0:(length(y)-1) . Thanks a lot !

  • @khairuannas2172
    @khairuannas2172 4 ปีที่แล้ว +1

    I have 3 questions.
    1) Why do I get error of "Subscript indices must either be real positive integers or logicals." at where you convert table to array? All my data are positive integer, only random number and not following the order (i.e. 2,4,6,...).
    2) I humbly want to ask this question. I'm really slow at this, therefore I'm sorry but I wish to know. I do not see the formula of x square in the process of plotting the graph. How does reading table can plot graph y=x^2? What if I want to plot y=x^3+2x^2+3?
    3)The whole learning process here is really helpful. I am curious, can you plot a simple control chart using a sample set of data from excel into UIAxes?
    Thanks!

    • @BenitoSebastian
      @BenitoSebastian  4 ปีที่แล้ว +1

      Hi Khairu,
      1. You shouldn't get an indicies error if just have numbers in your data. I can't really help without seeing your code.
      2. The squaring itself is actually done in excel (In this example). But you can do this within appdesigner, all you have to do is create another variable i.e. xsqr = x.^2 and then plot(app.UIAxes,xsqr,y).
      3. I am not quite sure what you exactly mean by a control chart, but if you have data that you want to plot in a 2D or 3D graph, you can do it by following the same steps in the video.
      All the best!

    • @khairuannas2172
      @khairuannas2172 4 ปีที่แล้ว

      @@BenitoSebastian
      Hello Benito,
      Thank you for your reply. For Q1, You can view my code in the below:
      drive.google.com/open?id=1yHdiCZQE6TyAFjyuIAHBUOKgZ6SuD3mR
      Q2. I got it! Thanks!
      Q3. I am wondering if UIAxes is capable of using " controlchart(runout,'rules','we2'); " as shown in the link below:
      www.mathworks.com/help/stats/control-charts.html
      I'm currently working on it since I found it can use several run test like western electrics and nelson rules.
      It is possible to plot from the table, I am thinking of applying detection rule in the graph.
      Thank you!

    • @benha325
      @benha325 4 ปีที่แล้ว +1

      @@khairuannas2172 Hello, were you able to resolve this issue? If yes, how did you resolve it? I'm getting the same error message.
      Edit: Never mind, I fixed it.
      Instead of using x = table2array(t( : , "x Data" ) );
      I used x = table2array(t( : , 'x Data' ) )
      ;

  • @amirachouikh3371
    @amirachouikh3371 4 ปีที่แล้ว

    can you tell me please how to read the dimensions of an excel table ?

  • @joshuaraj204
    @joshuaraj204 4 ปีที่แล้ว

    can you show how to plot a bar graph in appdesigner

  • @ylyopstar1811
    @ylyopstar1811 4 ปีที่แล้ว

    Hi, I have a problem while writing the plot(app.UIAxes,x,y); it said "Error using plot, invalid data argument"
    So how to solve this problem?

  • @gourabmohapatra9543
    @gourabmohapatra9543 4 ปีที่แล้ว +1

    Can we able to read text file by this method??

    • @BenitoSebastian
      @BenitoSebastian  4 ปีที่แล้ว

      Hi Gourab,
      You will have to use uigetfile() for text files.
      All the best,
      Benito

  • @rishabhbanavalikar8155
    @rishabhbanavalikar8155 4 ปีที่แล้ว

    How do i plot a linear regression model from a table ?

  • @mohamedsoufi7956
    @mohamedsoufi7956 3 ปีที่แล้ว

    When I tried to import my xlsx file with the readtable function, I had this error come up "Error setting property 'Data' of class 'Table':
    Data must be a numeric, logical, or cell array"
    I eventually found a fix to it using the table2cell function
    t = readtable('pathname as string');
    app.UITable.Data = table2cell(t);
    The column renaming works the same as the video. Hope this helps somebody