Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Help creating in MATLAB the table T with column 1 being the alpha values and column 2 being the associated error values. I want T
Help creating in MATLAB the table T with column 1 being the alpha values and column 2 being the associated error values. I want T to look like the following but I can't get the for loop to save T as a 5X2 matrix (5 alpha values); it only produces the last iteration. It should look like the following:
function hw4_q1 Alphas [0, 1.0, 10.0, 100.0, 1000.01; n200: tot_it - 100; for alphaAlphas %Generate Linear System [A,bgenerate_SPD_mat_and_rhs_vec(n, alpha); sCompute Solution x jacobi -my_jacobi(A, b, tot it); "True" Solution %Errors err jacobi-norm(x_t - x_jacobi); I-[alpha, err_jacobil; end end 1.0e+03 0 0.0101 0.0010 0.0090 0.0100 0.0048 0.1000 0.0036 1.0000 0.0000Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started