matlab中如何调整legend的位置?答:legend('sinx',0); % 最佳位置 legend('sinx',1); % 右上角 legend('sinx',2); % 左上角 legend('sinx',3); % 左下角 legend('sinx',4); % 右下角 利用位置属性进行精确设置 gca=legend( 'sinx', 4 );set( gca, 'Position', [10, 50, 100, 400]); %...
matlab中画曲线怎么设置图例答:在matlab中如何设置图例,可以用legend()函数来设置。legend的功能是说明图形的对象,以字符串形式来说明。使用格式:legend('string1','string2',...) %string1——字符串 例如:x=linspace(-pi,pi,100);y1=x.^2-2*x+1;y2=asinh(x);plot(x,y1,'k-',x,y2,'r-')xlabel('x'),...