如何用matlab画出 f(x) = sqrt( 1-(|x|-1)^2 )

如题所述

>> x=-2:0.1:2;
>> y=sqrt(1-(abs(x)-1).^2);
>> plot(x,y)

温馨提示:答案为网友推荐,仅供参考
第1个回答  2015-04-22
x = -10 : 0.1 : 10
f = sqrt( 1-(abs(x)-1).^2 );
plot(x,f);