필터 지우기
필터 지우기

Error Meaning

조회 수: 5 (최근 30일)
milad babaei
milad babaei 2011년 8월 7일
Hi all,
i've checkek my script(using below code)for orders higher than 6,but faced with error as u can see.what should i do to be able to solve this problem and evaluate the equation for degrees up tp 9??
ERROR:
??? Error using ==> times
Matrix dimensions must agree.
Error in ==> fit2dPolySVD at 70
coeffs = v*qqs'*u'*zs;
Error in ==> svdfithc at 21
coeffs = fit2dPolySVD(X(:), Y(:), Z(:), order);
........................................................
the link:
http://mathworks.com/matlabcentral/fileexchange/31636-2d-polynomial-fitting-with-svd/content/fit2dPolySVD.m
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
my script:
clear
clc;
BoverH=1:8;
phi=0:10:30;
mydata = [ 1 1.02 1.11 1.21 1.3 1.4 1.59 1.78; ...
1 1.11 1.35 1.62 1.95 2.33 3.34 4.77; ...
1.01 1.39 2.12 3.29 5.17 8.29 22 61; ...
1.13 2.5 6.36 17.5 50 150 1400 14800];
h=log(mydata);
y=phi;
x=BoverH;
z=h;
order = 8;
[X, Y] = ndgrid(BoverH, phi);
Z = h.';
coeffs = fit2dPolySVD(X(:), Y(:), Z(:), order);

답변 (1개)

Jan
Jan 2011년 8월 7일
Your data has 8 columns only. I assume for a higher order fit, you need more data.

카테고리

Help CenterFile Exchange에서 Polynomials에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by