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
Simple and useful
sir kindly specify, how we multiply the matrices with variable elements and plot the determinant of the product of the matrix in Matlab
Simple and easy as ever sir
Thanks you soo much , I need that
Thank you sir you made me clear it alot
Stay tuned and dont forget to subscribe
Thank you sir
Welcome
Nice. I'm trying to figure out how to make a for loop with odd increments.
Wowwwww thanks
I cannot manage to enter the command between for and end! Do I do that in the editor or in command window?
very useful. still i don't know nothing😁
Hahaha great
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
Thank you🇩🇿💚
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?
Output me kia show horha ha kohi error to nhi dia
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?
You will need a for loop for row and tgen for column. Nested for and then use compare condition to search
@@electricallectures thank you really appreciate your help, do you reckon you could help me code this on a private basis.
sir how to write loop for double/series summation