Question: 2. The matlab function fun2.m Minimize File Preview ZOOM function [ y ] -fun2(x, c) s fun2 (x) evaluates the function f: R2R*2 defined by

 2. The matlab function fun2.m Minimize File Preview ZOOM function [

y ] -fun2(x, c) s fun2 (x) evaluates the function f: R2R*2

2. The matlab function fun2.m Minimize File Preview ZOOM function [ y ] -fun2(x, c) s fun2 (x) evaluates the function f: R2R*2 defined by E(x) f(x1, x2)tanh (c1 x1+c2 x2+c3) where el,e2, and e3 are input parameters s input 611 x vector of length 2: x1,x2) [cl,2.3] vector of length 3 apecifying the parameters s output y(x1,x2) tanh (c(11%(1) + e(21%(2) + e(3)); end defines a function f(-; c) R2R, defined by 3 parametersc(, c(2), c(3)], which are specified as input to the function. This function was used with a fixed choice of parameters c, to generate 10 data points of the form [x(j,:), y(i)],j-1,...,10, where z(j,:) is a vector of length 2, representing the a coordinates of the jth data point, and y(j)-f(x(,:. These 10 data points are given in the file data 2.txt -ZOOM 2.44417106 2.71737581 0.38096045 2.74012757 .89707774 0.29262121 0.83549466 1.64064456 2.87252051 2.89466561 x (2) 0.47283925 2.91177835 2.87150084 1.45612695 2.40084141 0.42565902 1.26528385 2.74720658 2.37662199 2.87847728 E (x) 0.56420802 0.81910SSs 0.72228037 0.69894667 0.74864982 0.39219713 0.56258435 0.76720815 0.78664795 0.82271503 . Write a matlab program hwk1prob2.m that uses fsolve to determine the parameters c that were used to generate the data. Run your program outputting the results to the file hwk1out2.txt o Hints/suggestions .You might want to write a matlab function call "fresidual.m" that calculates the residual r(c) - [ri(c),.. .,T1o (c)], where r,(c)f((j,:;cyi),j1,...,10 Use fsolve to solve the equation r(c) 0 In your answer, please include both the matlab script programs, as well as the executable code and output. 2. The matlab function fun2.m Minimize File Preview ZOOM function [ y ] -fun2(x, c) s fun2 (x) evaluates the function f: R2R*2 defined by E(x) f(x1, x2)tanh (c1 x1+c2 x2+c3) where el,e2, and e3 are input parameters s input 611 x vector of length 2: x1,x2) [cl,2.3] vector of length 3 apecifying the parameters s output y(x1,x2) tanh (c(11%(1) + e(21%(2) + e(3)); end defines a function f(-; c) R2R, defined by 3 parametersc(, c(2), c(3)], which are specified as input to the function. This function was used with a fixed choice of parameters c, to generate 10 data points of the form [x(j,:), y(i)],j-1,...,10, where z(j,:) is a vector of length 2, representing the a coordinates of the jth data point, and y(j)-f(x(,:. These 10 data points are given in the file data 2.txt -ZOOM 2.44417106 2.71737581 0.38096045 2.74012757 .89707774 0.29262121 0.83549466 1.64064456 2.87252051 2.89466561 x (2) 0.47283925 2.91177835 2.87150084 1.45612695 2.40084141 0.42565902 1.26528385 2.74720658 2.37662199 2.87847728 E (x) 0.56420802 0.81910SSs 0.72228037 0.69894667 0.74864982 0.39219713 0.56258435 0.76720815 0.78664795 0.82271503 . Write a matlab program hwk1prob2.m that uses fsolve to determine the parameters c that were used to generate the data. Run your program outputting the results to the file hwk1out2.txt o Hints/suggestions .You might want to write a matlab function call "fresidual.m" that calculates the residual r(c) - [ri(c),.. .,T1o (c)], where r,(c)f((j,:;cyi),j1,...,10 Use fsolve to solve the equation r(c) 0 In your answer, please include both the matlab script programs, as well as the executable code and output

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!