Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i want a code in matlab for three questions Page 1 of 1 Term 212 LAB # 2 (MATLAB) Math 371 Introduction to Numerical Computing

i want a code in matlab for three questions
image text in transcribed
Page 1 of 1 Term 212 LAB # 2 (MATLAB) Math 371 Introduction to Numerical Computing Instructor: Dr. Muhammad Munir Butt Task 1. The "end" structure: The simplest form of the if statement is if expression statements end Task 2. The "for...end" loop: The syntax is for variable expression statements end Task 3. MATLAB has four control flow structures: the if statement, the for loop, the while loop, and the switch statement Task 4. How to write a function in MATLAB? For example, if f(x) = sin(x) + exp(3x) then in MATLAB, we write 1-(x) sin(x)*exp(3*x) MATLAB Assignment # 2 Question#1. Write the function f(x) = x? - cos(x) in an m-file called "myFun.m" = 3,4,5. Question#2. Write a MATLAB code to find the Maclaurin series for et = 1+x+ 2+ 3 Use this to compute the value of 0.5 and find and plot the error(s) for n= 3, 4, 5. Question#3. Write a MATLAB code for the following: The Nth Taylor polynomial for f(x) = In x expanded about xe = 1is P1) = (-1)+1 and the value of In 1.5 to eight decimal places is 0.40546511. Construct an algorithm to determine the minimal value of N required for In 1.5 - Pr(1.5)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Does the escape speed of a rocket depend on its mass? Explain.

Answered: 1 week ago

Question

(1 point) Calculate 3 sin x cos x dx.

Answered: 1 week ago

Question

Find the derivative of y= cos cos (x + 2x)

Answered: 1 week ago