MATLAB如何删除某一段特定函数图像呢。

6 Ansichten (letzte 30 Tage)
eaqbqwn
eaqbqwn am 23 Mai 2023
Beantwortet: yqjdcedc am 23 Mai 2023
代码如下,我该如何删去黄色标记的这一部分呢?
x=0.005:0.00001:1;
g=(1+((4+800*0.5*x)./x+1).^(0.5))./(4+800*0.5.*x);%
k=min(min(g,1)./(2*x),1);
x2=(-0.06+(0.06*0.06+4*0.01*36).^(0.5))/72;%
y2=1*(x>0&x<x2)+k.*(x>x2&x<1);
plot(x,y2,'-.','linewidth',1);
line([x2,x2],[0,1],'linestyle','-.','color','r');
axis([0 0.3,0 1.5]);

Akzeptierte Antwort

yqjdcedc
yqjdcedc am 23 Mai 2023
你看你的代码都会这样用了,为啥不会我提到的方法呢?除非这代码不是自己写的吗?你要用得到的就是给y赋值为NaN而已,建议学学matlab基础知识。

Weitere Antworten (0)

Kategorien

Mehr zu Logical finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!