MATLAB for Engineers - Introduction to for Loops (Part 3 of 4): Indexing and Storage in Arrays

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

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

  • @valeriereid2337
    @valeriereid2337 หลายเดือนก่อน

    Thank you so very much. I appreciate these lectures.

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

    Thank you for your video, I am using them to complement my practice with Matlab. Sometimes my book is difficult to follow but with your videos I can understand better the concepts and solve the exercises of my book.

  • @ΙάσωναςΦιλιππίδης
    @ΙάσωναςΦιλιππίδης 3 ปีที่แล้ว +2

    Really nice and helpful videos! Greetings from Greece!

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

    Great Explanation, you are able to save my dream to be graduated

  • @kapisotieno2302
    @kapisotieno2302 3 ปีที่แล้ว +2

    Good lecture. I understand clearly the objective of this tutorial. I yearn for more. thanks

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

    U are my hero I swear !! Thankfully

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

    very good lecture, please add more and more videos

  • @AdityaSingh-kw8bi
    @AdityaSingh-kw8bi 4 ปีที่แล้ว

    great to see you again bro we will be rich soon :) loves your videos

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

    glad u r back. I love ur videos bro.

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

    You are a life saver!

  • @Fxm112-r4v
    @Fxm112-r4v ปีที่แล้ว +1

    what if I wrote the following instead?
    for x=0:2:8;
    y=x^2
    end
    is it the same? Thanks

    • @ogechiogbonna368
      @ogechiogbonna368 8 หลายเดือนก่อน +1

      It's not the same
      the final output of your code will be a scalar i.e a 1 by 1 matrix
      But the final output of the code he has written will output an array of 1 x 5 matrix

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

    dude, thanks so much!!!!!!!!!!!!!!!!!

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

    Thank you a lot

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

    How can we detect a sign change in a vector using for loop

  • @eedeatlikkle3652
    @eedeatlikkle3652 3 ปีที่แล้ว +1

    Quick q, if you want to just use one value of y, say when i = 3 for some other calculation, how do you do that. Because if I write y in the conmand window it just gives me the latest y value (when i is 5)?? Would really appreciate a quick reply thanks

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

      You can use an array index to reference the element you are interested in. In your case, y(3) would return the third element in y.

  • @Antonio-ms3gb
    @Antonio-ms3gb 3 ปีที่แล้ว

    Catapimbas ! Muito bom !

  • @sam-kx3ty
    @sam-kx3ty 3 ปีที่แล้ว +1

    talented man haha!!

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

    can u suggest on handling more than two indexes or variables in matlab. let's, for example, assume that Y is function of three variable, x,z,t and we want to have values of y as all variables change and store results at point of my interest. for example store values of y as t varies and x and z are kept at specific values.

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

    why'd you do it this way and not like the way you did in previous videos? why did you introduce "i" abruptly?

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

      That's a good question. The index variable, i, is used to store values in a specific element in an array. For example, A(1) is the first element in A (where i = 1). Similarly, A(5) is the fifth element in A (where i = 5). So an array index can be used to tell MATLAB where to store a value. It can also be used to extract a value from an array from a specific location. I'm realizing this is difficult to explain in a comment... I may create a separate video for this topic. Thanks for commenting.

  • @jacobhouston1655
    @jacobhouston1655 3 ปีที่แล้ว +1

    This y(i), the i character is giving me SUCH A HARD TIME watching your vidoes. Everything is smooth until that (i) comes up. Could yo uplease explain this whole (i) concept in a video by itlsef? Very frustrating. :(

  • @jacobhouston1655
    @jacobhouston1655 3 ปีที่แล้ว +1

    I despise this (i). I don't understand it.

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

      I had trouble with this as well for many years now, and I think I just realized that i is a counter for all the numbers in the array, that is, it holds all the numbers you want to calculate a function for. So for y(i), you are calculating the function y at whatever value i is. That is the way I understand it at the moment. "i" can also be any letter or letters or whatever you want it to be, as long as you stay consistent during the course of your code.