How can I plot in 3D with three different size vector?

4 ビュー (過去 30 日間)
Prajan Pradhan
Prajan Pradhan 2014 年 11 月 16 日
コメント済み: Prajan Pradhan 2014 年 11 月 17 日
Actually I have
a=[-2 -1.5 -1 0 1 1.5 2];
b=1:16368;
c=1:16368;
I used plot3 and stem3 but it requires vector of equal length. How can I do this? Please give me any suggestion.
  1 件のコメント
Prajan Pradhan
Prajan Pradhan 2014 年 11 月 17 日
Is there no one to give me some solution?

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

回答 (1 件)

Luuk van Oosten
Luuk van Oosten 2014 年 11 月 17 日
Another option is scatter3;
try use
scatter3(a,b,c)
But you already gave the answer yourself;you require vectors of equal length. Try:
length(a)
this will return 7.
length(b)
and
length(c)
both return 16368.
you could try to make 'b' and 'c' using linspace;
b = linspace(1,16368,7)
checkcheck: length(b)=7.
On the other hand, I have no idea what you are trying to do, so maybe you could specify your problem a bit more.
  1 件のコメント
Prajan Pradhan
Prajan Pradhan 2014 年 11 月 17 日
Actually I have two loops:
for frequency=1:7
for code=1:16368
some calculation and matrix'correlation' of size of 7*16368
end
end
And I have to show the relation between frequency,code and the vector 'correlation'
How can I do this?

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by