How can I solve this error (Improper assignment with rectangular empty matrix.) with listed below script. Thanks

조회 수: 3 (최근 30일)
elevtocellsI1=accumarray(OrbNO,elev2,[],@(x) {x});
DDDD=zeros(1,size(elevtocellsI1,1));
for i=1:size(elevtocellsI1,1)
DDDD(i)=(find(elevtocellsI1{i}, 1, 'last' )-(find(elevtocellsI1{i}, 1 )))/60;
end
figure(567432)
bar(DDDD)
title('Passage Time Over the GS')
xlabel('time(Seconds)')
ylabel ('Passage Time (min)'),
grid on
  댓글 수: 2
Stephen23
Stephen23 2017년 1월 9일
@Oday Shahadh: please edit your question and give us the complete error message. That means all of the red text.
Also it helps if you give us code that actually works (so that we can run it), otherwise we have to rely on using our magic crystal balls to read what is on your computer monitor.
Oday Shahadh
Oday Shahadh 2017년 1월 9일
Improper assignment with rectangular empty matrix.
Error in BAN_FINAAl (line 710) DDDD(i)=(find(elevtocellsI1{i}, 1, 'last' )-(find(elevtocellsI1{i}, 1 )))/60;

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

채택된 답변

Walter Roberson
Walter Roberson 2017년 1월 9일
Some of the cells resulting from accumarray are likely to be empty. find(elevtocellsI1{i}, 1, 'last' ) on the empty cell is going to be empty. (find(elevtocellsI1{i}, 1, 'last' )-(find(elevtocellsI1{i}, 1 )))/60 would then be empty. You try to assign that emptiness to a definite location DDDD(i)
  댓글 수: 11
Oday Shahadh
Oday Shahadh 2017년 1월 9일
I attached the elevation plot, in which each line segment on the time axes under each the fives curves represents the time the satellite spent over the GS
Walter Roberson
Walter Roberson 2017년 1월 9일
I need to do something else for a while; I will have a look later this evening.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Automated Driving Toolbox에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by