필터 지우기
필터 지우기

the following code only gives 4 areas,not 8,why?

조회 수: 1 (최근 30일)
shahriar sowad
shahriar sowad 2021년 6월 29일
댓글: shahriar sowad 2021년 6월 30일
clc
a1=reshape(COAL',[1,378*49]);
a=movmean(a1,[0 49],2);
area(a,'facecolor','r' );
hold on
b1=reshape(GAS',[1,378*49]);
b=movmean(b1,[0 49],2);
area(b,'facecolor','g');
hold on
c1=reshape(HVDC',[1,378*49]);
c=movmean(c1,[0 49],2);
area(c,'facecolor','b');
hold on
d1=reshape(HYDRO',[1,378*49]);
d=movmean(d1,[0 49],2);
area(d,'facecolor','m');
hold on
e1=reshape(OIL',[1,378*49]);
e=movmean(e1,[0 49],2);
area(e,'facecolor','y');
hold on
f1=reshape(P_GEN_GAS_',[1,378*49]);
f=movmean(f1,[0 49],2);
area(f,'facecolor','k');
hold on
g1=reshape(P_GEN_OIL_',[1,378*49]);
g=movmean(g1,[0 49],2);
area(g,'facecolor','c');
hold on
h1=reshape(TRIPURA',[1,378*49]);
h=movmean(h1,[0 49],2);
area(h,'facecolor','w');

채택된 답변

Walter Roberson
Walter Roberson 2021년 6월 29일
Use 'omitnan' as an option on the movmean()
If there are any nan in the data, then it will omit the entire face. It will not make any attempt to interpolate or insert a hole: a single NaN ruins the entire face.
  댓글 수: 5
Walter Roberson
Walter Roberson 2021년 6월 29일
You deleted the file before I could get it. (I am working on other things at the same time.)
shahriar sowad
shahriar sowad 2021년 6월 30일
i am sorry for my mistake,i solved the problem,thank you very much for your help

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by