필터 지우기
필터 지우기

Storing OutPut of Function

조회 수: 1 (최근 30일)
Andrew You
Andrew You 2014년 10월 5일
편집: Jan 2014년 10월 5일
So I want to store the value of Q into the variable 'Qtr' when the inputs are v=15 and MaxDegree=30 for the following function:
function [ x, A, Q, R, Qc, Rc, Qm, Rm ] = Experiment1( v, MaxDegree )
%EXPERIMENT1: Inputs v, MaxDegree and outputs x, A, Q, R, Qc, Rc, Qm, Rm.
N = 2.^v+1;
x = linspace(-1, 1, N);
A = zeros(N, MaxDegree);
for j=1:MaxDegree
A(:,j) = x.^(j-1);
end
[Q,R] = qr(A,0);
[Qc,Rc] = clgs(A);
[Qm,Rm] = mgs(A);
Thank you for your help! :)
  댓글 수: 1
Jan
Jan 2014년 10월 5일
편집: Jan 2014년 10월 5일
What is your question? What is the difference between your expectations and the results of the posted code?

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by