Error: Index exceeds the number of array elements (0) on the linspace function
1 回表示 (過去 30 日間)
古いコメントを表示
I have a following part of a long code that plots two data, Variables (time, value) and frequency ( the same start and end of time of the variables but different values).
The code already does what I want, it plots so many figures until it stops with the following error at the fourth line of the code:
Index exceeds the number of array elements (0).
Error in duration/parenReference (line 17)
that.millis = this.millis(rowIndices);
Error in Erstellungderfrequenzinputbox (line 99)
ftime3=linspace(Uhrzeit(1),Uhrzeit(end),height(freqbereich3));
freq3 = freqbereich3.fb3;
freq3 = double(split(string(freq3(2:end-1)) , ","));
freq3 = freq3(:,1);
ftime3=linspace(Uhrzeit(1),Uhrzeit(end),height(freqbereich3));
freqbereich3.ftime3=ftime3';
nexttile
plot(ftime3(2:end-1),freq3);
hold on
plot(Uhrzeit,Wert)
Uhrzeit is the time and freqbereich3 are both all long tables with values that should have the same length or the same number of values that's why I used the linspace. Any solution or help?
0 件のコメント
採用された回答
Walter Roberson
2020 年 11 月 27 日
ftime3=linspace(Uhrzeit(1),Uhrzeit(end),height(freqbereich3));
If Uhrzeit is empty then Uhrzeit(1) would be out of range.
2 件のコメント
Walter Roberson
2020 年 11 月 27 日
T= [Table1;Table2]; %Aufsummieren der beiden Tabellen in einer.
You do not assign to Table1 or Table2 within the loop, so that assignment is going to do the same thing on every loop iteration. I think you need to insert code that modifies Table1 or Table2
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Whos についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!