2d plot from 1d plot

조회 수: 2 (최근 30일)
omnia
omnia 2016년 11월 26일
댓글: Star Strider 2016년 11월 27일
Hello all.
I have one vector as a function of x of length 1220 point and another vector as a function of y of length 1933 point. These points are arbitrary measure of my x and y distance respectively. I want to multiply them together to get a third vector of x and y, then I want to plot with x and y. Any help how can I do it will be appreciated.
  댓글 수: 1
omnia
omnia 2016년 11월 26일
Note that my x and y distance are different from each other.

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

답변 (1개)

Star Strider
Star Strider 2016년 11월 26일
‘Note that my x and y distance are different from each other.’
The interp1 function is your friend here.
  댓글 수: 6
omnia
omnia 2016년 11월 27일
let me describe the problem in better way. I have two field, one in x direction described over length w, and the other in y described over range h. I have two plots of them which I am attaching. What I want to do is multiply them together over the rectangle of area w*h. My question is how to multiply them?
<<
<<
>>
>>
Star Strider
Star Strider 2016년 11월 27일
I can’t suggest anything other than what I already posted. It seems to me that you are doing matrix multiplication, so that something like this is what you want:
m = w(:) * h(:)';
This will produce matrix ‘m’ that has ‘length(w)’ rows and ‘length(h)’ columns.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by