2d plot from 1d plot
2 次查看(过去 30 天)
显示 更早的评论
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 个)
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 个评论
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 Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!