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

preview_player
Показать описание
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
Рекомендации по теме
Комментарии
Автор

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

usmanalikhan
Автор

Thank you sir you made me clear it alot

sulaimanmunawar
Автор

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

johannasteinbock
Автор

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

OceanIgs
Автор

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

tsehayenegash
Автор

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?

dawoodshafique
Автор

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\n", i);
elseif r~=0 && s~=0
fprintf("%d is not divisible by 2 or 3\n", i);
elseif r~=0 && s==0
fprintf("%d is divisible by 3 \n", i);
elseif s~=0 && r==0
fprintf("%d is divisible by 2\n", i);
end
end

N is given by me in input.is this wrong?

shresthabanerjee
Автор

sir how to write loop for double/series summation

pavankumarbejjipurapu