Info

この質問は閉じられています。 編集または回答するには再度開いてください。

making a colour map of my intensities, contour not working ?

1 回表示 (過去 30 日間)
Youseff
Youseff 2014 年 2 月 25 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
well i have a 64by1 matrix of x and z values, and for each position [x,z] i have an intensity(pressure) at that point so basically another 64by1 matrix of intensities. well what i want is a colour map having the axis (horizental x, vertical z) and showing the distribution of the intensities with the highest being red. contour didnt work saying that Z should be a 2x2 matrix.

回答 (1 件)

Walter Roberson
Walter Roberson 2014 年 2 月 25 日
gridsize = 100; %as appropriate
F = scatteredInterpolant(x, z, intensities);
[X, Z] = ndgrid( linspace( min(x), max(x), gridsize), linspace( min(z), max(z), gridsize) );
gIntensities = F(X, Z);
contour(X, Z, gIntensities)
or perhaps you were looking for a histogram? If so look in the File Exchange for hist2()

この質問は閉じられています。

製品

Community Treasure Hunt

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

Start Hunting!

Translated by