Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

HW2-1. Write an M-file to make the following four variables. 212 *** (c) C = (a) A = is a 6x6 matrix full of

HW2-1. Write an M-file to make the following four variables. 212 *** (c) C = (a) A = is a 6x6 matrix full of

HW2-1. Write an M-file to make the following four variables. 212 *** (c) C = (a) A = is a 6x6 matrix full of 2's (use ones or zeros). 100 020 (b) B= 0 0 3 000 2-2 12 11 12 B E [91 92 www *** *** ... www *** 0 0 0 is a 9x9 matrix of all zeros, but with the values [1 2 3 4 5 4 3 2 1] on the main diagonal (use diag). : 10 20 is a 10x10 matrix where the vector 1:100 runs down the rows (use reshape). 1 100 (d) Make D be a 3x5 matrix of random integers with values on the range -10 to 0 (use rand and floor or ceil or fix). zinput your answer here for HW2-1 HW2-2. Using left division operator (\) to solve curve fitting problem. (a) Find the least squares parabola f(x) = ax + bx + cx+d for the set of data X -2 -9.8 (b) Compare your results (a,b,c,d) with the results returned by builtin function p-polyfit(x,y,3). (c) Plot the sample data points with blue circle marker and the fitting curve. -1 -8.8 0 -6.3 1 2 -5.8 3.2

Step by Step Solution

3.55 Rating (169 Votes )

There are 3 Steps involved in it

Step: 1

clear close all clc HW21 a A ones62 b B diag1 2 ... 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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Matlab An Introduction with Applications

Authors: Amos Gilat

5th edition

1118629868, 978-1118801802, 1118801806, 978-1118629864

More Books

Students also viewed these Accounting questions

Question

=+V1. Why is the brand so important when marketing a product?

Answered: 1 week ago