Data dimensions must agree.

surf(yvalue, xvalue,abs(Xpow) ,'EdgeColor','none'); % getting error in this line...
colorbar
axh = mesh(T-T(1), v_grid_new, abs(STFT_data(:,:,(1+Lr*La)/2)));
view(2)
shading interp
xlabel('Angle of arrive(degrees)')
ylabel('Range(meters)')
title(['Range-Angle heatmap FrameID:' num2str(i)] );
hold off;
pause(0.1)

2 件のコメント

Dyuman Joshi
Dyuman Joshi 2023 年 2 月 4 日
編集済み: Dyuman Joshi 2023 年 2 月 4 日
What is the size of yvalue, xvalue and Xpow? and please copy-paste the full error message.
Prapthi
Prapthi 2023 年 2 月 7 日
Error using surf
Data dimensions must agree.
Error in mmwave_3d_angle (line 234)
surf(yvalue, xvalue,abs(Xpow) ,'EdgeColor','none');
Size of xvalue and yvalue is in the matrix of 100X256, but the size of Xpow is 128X256

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

回答 (1 件)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2023 年 2 月 4 日
編集済み: Sulaymon Eshkabilov 2023 年 2 月 4 日

0 投票

Check the sizes of these variables:
size(yvalue)
size(xvalue)
size(abs(Xpow))
See e.g.:
x = -10:.2:10;
y = -pi:.1:pi;
[Xvalues, Yvalues]=meshgrid(x,y);
Z = exp(sin(Xvalues))+exp(cos(Yvalues));
surf(Yvalues, Xvalues,Z) % Correct entries
Xt = Xvalues.';
surfc(Yvalues, Xt, Z) % size mismatch
Error using surf
Data dimensions must agree.

Error in surfc (line 54)
hs = surf(cax, args{:});

カテゴリ

ヘルプ センター および File ExchangeColor and Styling についてさらに検索

タグ

質問済み:

2023 年 2 月 4 日

コメント済み:

2023 年 2 月 7 日

Community Treasure Hunt

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

Start Hunting!

Translated by