T-test cutoff
    조회 수: 5 (최근 30일)
  
       이전 댓글 표시
    
Hi all, 
I am currently working with a data set that will be displayed on a map. After I calculated the t-value I decided that It will be better to visualize only the values that are on the above my 90% or 2.32. How can I make this cutoff on my code without using if statement? Thanks in advance.

figure (3)
h= pcolor(lon_gridded,lat_gridded,tstat);
set (h, 'Edgecolor', 'none');
hold on
plot (coastlines(:,1), coastlines(:,2))
shading flat 
colormap(jet(9))
%caxis([bottom top]);
xlim([lon_start lon_end]);ylim([lat_start lat_end])
댓글 수: 0
답변 (1개)
  Asvin Kumar
    
 2019년 10월 31일
        Try adding the following lines before plotting the values: 
tstatMod = tstat; 
tstatMod(tstat<=2.32) = NaN; 
And then modify your pcolor command to: 
h = pcolor(lon_gridded,lat_gridded,tstatMod); 
The following articles might help you understand Logical Indexing better: 
댓글 수: 0
참고 항목
카테고리
				Help Center 및 File Exchange에서 Graphics Object Properties에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

