Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

adding contour lines to pcolor plot

조회 수: 1 (최근 30일)
Giulia
Giulia 2023년 3월 23일
마감: Cris LaPierre 2023년 3월 23일
Hi everyone,
I'm trying to add contour lines at 13 degrees to my pcolor plot, but I get the following error:
Error using contour
Input arguments must be numeric or objects which can be converted to double.
Data in the contour code are attached and they are:
combine averages: 153x33 double
depth: 33x1 single
dateVector: 1x153 datetime
Here's my code:
t1 = datetime(2021, 5, 1)
t2 = datetime(2021, 9, 30)
dateVector = t1:t2
combinedaverages = [dailyaverages; dailyaverages06; dailyaverages07; dailyaverages08; dailyaverages09];
figure
pcolor(dateVector, depth, combinedaverages')
set(gca, 'YDir','reverse')
shading flat
ylim([0 70])
colorbar
hold on
contour(dateVector,depth,combinedaverages',[13 13],'k');

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by