R2020b Matlab Editor is running very slow

7 次查看(过去 30 天)
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