Question
Matlab

Problem 2 (15%) >>for n 2:3; >>end write the results of f?
0 0
Add a comment Improve this question Transcribed image text
Answer #1

f = 1 is Global initial condition.

for n =2:3

f = f*n;

step1:

first Matlab take the f =1 and n= 2 and calculate the f = f*n which is equal to 2

now f=2;

step:2

Now it take f =2 and n=3 and calculate the f =f*n which is equal to 6

The result of f are 2 and 6

Initialization Step

Step 1:

Step2:

Final step

I want to show the results in Matlab that's why I attached the screenshots.

If you like it please thumbs up.

Add a comment
Know the answer?
Add Answer to:
Matlab Problem 2 (15%) >>for n 2:3; >>end write the results of f?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT