does the query points in gridfit function need to start from zero?

1 回表示 (過去 30 日間)
manoj saladi
manoj saladi 2019 年 4 月 6 日
コメント済み: John D'Errico 2019 年 4 月 9 日
Hi,
I have a syntax in the form
id=gridfit(P,T,isd,P_v,T_v);
where P,T,isd are mxn matrices respectively and P_v,T_v are query points which are vectors of same order.
When I run the command its showing me warnings like shown below.
Warning: xnodes(1) was decreased by: 0.00034779, new node = 0.000706
Warning: xnodes(end) was increased by: 0.031914, new node = 0.10956
Warning: ynodes(1) was decreased by: 223.9438, new node = -223.5738
Warning: ynodes(end) was increased by: 98.383, new node = 223.5585
Warning: Rank deficient, rank = 1918702, tol = 4.754832e-06.
My P_v and T_v values doesn't actually start from zero. I suspect maybe this is a problem and I'm not sure.
Can anyone plz tell me what would be the exact problem?
Thanks in advance
Manoj.

採用された回答

John D'Errico
John D'Errico 2019 年 4 月 7 日
編集済み: John D'Errico 2019 年 4 月 7 日
No. There is no requirement about needing to start from zero. In fact, those were WARNINGS, not errors. It MAY indicate a problem in how you are trying to use gridfit. Hard to know.
Gridfit is a tool designed to fit a surface over some domain of points. You specify a grid of nodes, where it builds a lattice based on the grid you specify.
But suppose your data goes outside of the grid you give it? gridfit cannot then interpolate those data points that live outside of the lattice you specified. It cannot use those points, because they live in places beyond the grid.
There are several problems in those warnings. First, the question of why it had to expand the grid. For example, suppose you posed data to fit a surface to that varies from -100 to +100 in both x and y? But now you specify grid points that span only from 0 to 1?
I don't know what your data looks like. But it appears that you have created a severe mismatch of the gridded surface you want to build, compared to your data.
More important is the warning of rank deficiency. That problemly suggests your data has some serious problem in it. Perhaps you only supplied two data points, then wanted to build an entire surface. Or perhaps they all lie in a straight line. It is hard to know without seeing your data to be able to help you more.
  4 件のコメント
manoj saladi
manoj saladi 2019 年 4 月 8 日
Ok, let me be more clear. I derived two vectors, one of them is torque and the other one is flux.
These vectors should serve me as break points for 2d lookup tables in simulink. The table data in the lookup tables should be currents. But the problem is that the currents is not a matrix but a vector. So, my intention is to make this current vector into a matrix, so that I can use it as a table data in 2d lookup table with my derived torque and flux vectors as my break points. Like as in the picture below
id lookup.PNG
I have currents as a vector from a data sheet and torque, flux as matrices, but I want to derive currents as a matrix based on the torque and flux vectors which I derived (not the one in data sheet). I felt like gridfit can derive the current as a matrix. Am I think in a wrong way?
Syntax: Current_matrix = gridfit(flux_datasheet, Torque_datasheet, currentvector_datasheet,flux_derived,torque_derived);
Thank you.
John D'Errico
John D'Errico 2019 年 4 月 9 日
Having seen your other question on this, where you finally showthe data you have available, this is not a problem that gridfit cansolve happily, nor should you use that tool. Your data is insufficient to create that surface.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeComputational Geometry についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by