Using contourf with 1D data
4 ビュー (過去 30 日間)
古いコメントを表示
Hi, I need to plot data in a polar projection using something like contourf. I have three 1D vectors something like as follows:
if true
% code
end
x = rand(1,10);
y = rand(1,10);
contourf(x,y,z);
if true
% code
end
This gives an error as z needs to be 2D, anyone know how I can reshqape z to suit padding everywhere else with zeros???
0 件のコメント
回答 (1 件)
Arthur
2012 年 11 月 20 日
I don't really understand what you want to do. Why do you want to show a vector as 2D data???? Especially with random x and y... Anyway, you could pad zeros with paddarray (if you have de image processing toolbox). Otherwise, you could also use this:
z_padded = zeros(10);
z_padded(:,1) = z;
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Purple についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!