필터 지우기
필터 지우기

This leads to minc ||Ac − y||, Now for n = 10, xj = 1 + (j − 1)/(n − 1) and yj = e xj , find c1, c2 and c3. Solve problem by using matlab.

조회 수: 1 (최근 30일)
Chun Kit NG
Chun Kit NG 2022년 2월 8일
댓글: Walter Roberson 2022년 2월 9일
  댓글 수: 3
Chun Kit NG
Chun Kit NG 2022년 2월 8일
just using matlab to write code to solve question. Find c1,c2 and c3.
Jan
Jan 2022년 2월 8일
@Chun Kit NG: This is the question of your homework. But what is your question? The forum will not solve your homework, but if you show your current code and ask a specific question, we assist you to solve it by your own.

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2022년 2월 8일
Did you code in the equations it told you to? From the question:
n = 10
x = 1 + (1:10 - 1) / (n-1)
y = exp(..........
and then call polyfit() to fit the quadratic? It's literally just 4 lines of code - including the call to polyfit(). I'm confident you can do it!
  댓글 수: 4
Chun Kit NG
Chun Kit NG 2022년 2월 9일
I don't know how to continue. How can i input the matrix and solve Ac-y?
Walter Roberson
Walter Roberson 2022년 2월 9일
format long g
A = magic(5)
A = 5×5
17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 12 19 21 3 11 18 25 2 9
b = [7 3 8 2 4].'
b = 5×1
7 3 8 2 4
c = A\b
c = 5×1
-0.148269230769231 0.184423076923077 -0.0261538461538461 0.0382692307692308 0.320961538461538
A*c - b
ans = 5×1
1.0e+00 * 0 0 0 -2.22044604925031e-16 0

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Parallel Computing Fundamentals에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by