R2020b Matlab Editor is running very slow

조회 수: 7 (최근 30일)
Mostafa Abotaleb
Mostafa Abotaleb 2021년 7월 22일
편집: dpb 2021년 7월 24일
Good day everyone,
Please, I wish if someone can kindly help me to solve the following problem. I wrote the code in the attached file on Matlab R2020a to generate a trapezoidal wave, then analyze it , it was running perfectly, then suddenly when I started to run the code, it sarted to take an extemely long time to finsh the running process. I tried to check if the problem is from my lap top, that's why, I ran the same code on another lap top with a different matlab version R2017b , however the result was the same and the running time can be up to two or three hours. I wish if someone can kindly offer some help as soon as possible .
Thank you so much .
  댓글 수: 17
dpb
dpb 2021년 7월 24일
편집: dpb 2021년 7월 24일
for uu = 1:length(y4)
tt = uu + 1
if tt < length(y4)
subtra = y4(uu) + y4(tt);
if subtra >= 1 && subtra < 2;
y4(uu) = sym(y4(uu));
end
end
end
is
subtra=sum([y4(1:end-1);y4(2:end)]);
ix=(subtra>=1) && (subtra<2);
y4(uu) = sym(y4(uu));
but I still don't see the point/purpose of any of it.
It just looks like an effort to code sign in a round about way to me. What's the point of the addition of the two adjacent elements instead of just using the signal itself?
dpb
dpb 2021년 7월 24일
편집: dpb 2021년 7월 24일
Maybe what you're looking for instead of round or fix is ceil...but it's not clear just what the intent is/what the problem is that you're trying to cure.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Numbers and Precision에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by