pcolor
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi dear MATLAB user,
Im making a FDTD (acoustic preassure) model and at the end of each calculation representing the preassure. The problem is by wieving the contours, it only represents the actual preassure but if the wave hasnt arrived yet you wont see nothing from the contours.
for ...
for ...
end
...
pcolor((1:nx)*dh,(1:ny)*dh,10*log10(min(max(pp'.^2,1d-6),1)) );
shading flat,axis equal; colorbar; title(['time=' num2str(round((tt+maxtt*(ttt-1))*1000*dt)) ' ms']);drawnow
hold on
[x,y]=find(mapaz == 0);
contorno=plot(x,y,'+k');
set(contorno,'MarkerSize',10);
hold off
drawnow
end
Im trying to draw the contours stored in matrix 'mapaz': 0 = contour; 1 nothing.
nx and ny are the sizes of the matrix (1600x1200)
I really don't know to mix this together. Could you help me?
Thanks, Daniel Serra
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 7 Jun. 2011
Perhaps
contour((1:nx)*dh, (1:ny)*dh, 0 + (mapaz ~= 0), [1 1])
1 Kommentar
Walter Roberson
am 7 Jun. 2011
I just realized that I should probably have used == 0 instead of ~= 0
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Contour Plots finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!