Info

此问题已关闭。 请重新打开它进行编辑或回答。

How to interpolate (rephrased from previous question) ?

1 次查看(过去 30 天)
Lets say I have Matric A (3x4) and B (5x3)
A = 1 3 6 8
4 6 7 9
5 8 8 12
B = 1 4 6
2 5 5
3 4 6
6 8 9
5 7 4
and matrix C (9x1 matrix). which is a unique(a(:));
C=unique(A(:));
and C became:
C = 1
3
4
5
6
7
8
9
10
The purpose of A and B is such that. The all ROWS of B will be plotted as y-axis against column 1 of A as x-axis, then all ROWS of B against column 2 of A, then all ROWS of B against column 3 of A so on and till column 4 of A.
I want to interpolate B to have 10 points so that I can plot it against C.
D = interp1(A,B,C)
but was reflected
??? Error using ==> interp1 at 123
X must be a vector.
Not sure if is possible to interpolate like this. or is there any other way i can do this.
My intention is
D1 = interp1(""first column of A"",B,C)
D2 = interp1(""2nd column of A"",B,C)
D3 = interp1(""3rd column of A"",B,C)
So that all Ds are 5x10 matrix
May I know the proper command to go about this.
  2 个评论
Harry
Harry 2014-11-2
编辑:Harry 2014-11-2
Why did you delete my previous comments? If you respond to my previous comments, then I will give you the code.
hithere
hithere 2014-11-2
编辑:hithere 2014-11-2
i actually deleted the whole question and i cant delete comments anyway. cause i read through it and didnt make sense to me too. so i rephrased and posted this.

回答(0 个)

此问题已关闭。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by