Question

Write a Matlab program calculating A = (1/6626 1b- please use plot, subplot comments FOR THİS EQUATION : f(x) = In ( ) [x3-62

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1.)

  • A can be calculated in two ways: Using for loop and without using for loop

A using for loop:

  • Set A = 0 and add each term of summation to A

A = 0; %set A to 0

for i = 6:56

A = A + (1/factorial(6))^6*exp(6); %add each summation terms to A

end

disp(A) % display A

output:

A = 0; $set A to o for i = 6:56 A = A + (1/factorial (6))*6*exp(6); fadd each summation terms to A end disp (A) $display A 1.

without using for loop

  • Multiply the summation term (56-6+1) times to get A

%multiply summation terms (56-6+1) times to get A

A =(56-6+1)*(1/factorial(6))^6*exp(6);

disp(A)

output:

&multiply summation terms (56-6+1) times to get A A = (56-6+1) * (1/factorial(6))*6*exp(6); disp (A) 1.4769e-13

1b.)

  • Define a function handle to calculate f(x)
  • Then , plot f(x) for range of x. Here we will plot in the range -10 to 10

program:

%function handle to calculate A

f = @(x)log(6/12)*(x.^(3*6)*exp(56/cos(6)));

%range to plot f(x)

x = -10:10;

%plot f(x)

plot(x,f(x))

xlabel("x")

ylabel("f(x)")

title("f(X)")

grid on

output:
х1042 f(x) о -5 f(x) -10 -15 -10 -5 0 5 10 х

Add a comment
Know the answer?
Add Answer to:
Write a Matlab program calculating A = (1/6626 1b- please use plot, subplot comments FOR THİS...
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