To plot contour for an array : x,y,mass value having repeated values
古いコメントを表示
I m trying to plot a contour for a array (x,y,mass2): it is huge in size . The code is :
% initialise square matrix for contour of mass
mass2=zeros(length(xyz),length(xyz));
for i=1:length(xyz)
mass2(k,k)=xyz(i);
end
m2=max((diag(mass2*1e6)));
m1=min(mean(diag(mass2*1e6)));
contourlevel = m1:((m2-m1)/3):m2; % Required contour for 10 scale to 100
contour(xyz(1,:),xyz(2,:),(log10((mass2*1e6))),contourlevel);
My code shows the following error:
Error using contour (line 55)
Vector X must be strictly increasing or strictly decreasing with no repeated values.
Error in mass_2Dplane_z (line 151)
contour(y1,z1,(log10((mass2*1e6))),contourlevel)
My proble: high time in creating the square matrix for mass, and the isue of x array no being increasing order and the repeated values
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Contour Plots についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!