Creating a for loop in MATLAB | How to Use for Loop in MATLAB | Nested for Loop MATLAB

Поделиться
HTML-код
  • Опубликовано: 23 авг 2024
  • Creating a for loop in matlab. In this video, you will learn how to use for loop in matlab. A simple and easy tutorial on how to create for loop in matlab. for loop in matlab matrix, for loop in matlab, array in matlab for loop.
    #forloopinmatlab #matlabforloop #matlab #electricallectures

Комментарии • 21

  • @sultankhan9600
    @sultankhan9600 3 года назад +1

    Simple and useful

  • @usmanalikhan8440
    @usmanalikhan8440 Год назад +2

    sir kindly specify, how we multiply the matrices with variable elements and plot the determinant of the product of the matrix in Matlab

  • @wakh6260
    @wakh6260 3 года назад +1

    Simple and easy as ever sir

  • @YOUSSEF-fy5wv
    @YOUSSEF-fy5wv 5 месяцев назад

    Thanks you soo much , I need that

  • @sulaimanmunawar5934
    @sulaimanmunawar5934 2 года назад

    Thank you sir you made me clear it alot

  • @UECAshutoshKumar
    @UECAshutoshKumar Год назад +1

    Thank you sir

  • @OceanIgs
    @OceanIgs 7 месяцев назад

    Nice. I'm trying to figure out how to make a for loop with odd increments.

  • @sportnature3047
    @sportnature3047 3 года назад

    Wowwwww thanks

  • @johannasteinbock1848
    @johannasteinbock1848 10 месяцев назад

    I cannot manage to enter the command between for and end! Do I do that in the editor or in command window?

  • @arunCK44
    @arunCK44 2 года назад +1

    very useful. still i don't know nothing😁

  • @tsehayenegash8394
    @tsehayenegash8394 6 месяцев назад

    professor please help me. I have 366 row and 1890 column data i.e 366x1890. I want to sinusoidal curve fitting this data. how can I determine the amplitude the phase shift and the model of each column data? thank you

  • @wanassaben8269
    @wanassaben8269 Год назад

    Thank you🇩🇿💚

  • @shresthabanerjee494
    @shresthabanerjee494 Год назад

    Sir I was given the following question
    Write a MATLAB function called looptest (N) that loops through the values I through N and for each number n it should divisible by 2', 'n is divisible by 3, 'n is divisible by 2 AND 3 'n is NOT divisible by 2 or 3
    In answer i have written
    function loopTest(N)
    for i=1:10
    r=rem(i,2);
    s=rem(i,3);
    if r==0 && s==0
    fprintf("%d is divisible by 2 AND 3
    ",i);
    elseif r~=0 && s~=0
    fprintf("%d is not divisible by 2 or 3
    ",i);
    elseif r~=0 && s==0
    fprintf("%d is divisible by 3
    ",i);
    elseif s~=0 && r==0
    fprintf("%d is divisible by 2
    ",i);
    end
    end
    N is given by me in input.is this wrong?

    • @HassanKhan-sc7id
      @HassanKhan-sc7id 11 месяцев назад

      Output me kia show horha ha kohi error to nhi dia

  • @dawoodshafique2493
    @dawoodshafique2493 2 года назад +1

    how do you use a loop to search through a matrix to find specific value (which will be our condition) and return its index value of the value found?

    • @electricallectures
      @electricallectures  2 года назад +1

      You will need a for loop for row and tgen for column. Nested for and then use compare condition to search

    • @dawoodshafique467
      @dawoodshafique467 2 года назад

      @@electricallectures thank you really appreciate your help, do you reckon you could help me code this on a private basis.

  • @pavankumarbejjipurapu8846
    @pavankumarbejjipurapu8846 2 года назад

    sir how to write loop for double/series summation