MATLAB 在两个子图内分别画出余弦和反余弦曲线

2025-04-16 14:49:19
推荐回答(1个)
回答1:

subplot(2,1,1)
ezplot(@cos)
legend('y=cos(x)')
title('y=cos(x)')
subplot(2,1,2)
ezplot(@acos)
legend('y=arccos(x)')
title('y=arccos(x)')

%第二题
A=rand(1,10);B=rand(1,10);
plot(A,'rp')
hold on
plot(B,'yd')