这样转换对吗,还有什么转化方法吗
这个警告是什么意思,接下来strip函数应该怎么写
使用位置设置让两个坐标系叠在一起:
position = [0.15 0.2 0.75 0.6];
set(gca,‘xaxislocation’,‘top’,‘yaxislocation’,‘left’,‘position’,position);
theta_degree = 0:360;
theta_rad = theta_degree/180*pi;
position = [0.15 0.2 0.75 0.6];
plot(theta_degree,sin(theta_rad),'Linewidth',4); %这里画的被后面的覆盖了
set(gca,'xaxislocation','top','yaxislocation','left','position',position);
set(gca,'XTick',0:30:360); %设置x轴刻度
xlabel('Degree');
set(gca,'Linewidth',2,'Fontsize',20,'box','on');
axes;
plot(theta_rad,sin(theta_rad),'Linewidth',4);hold on
xlabel('Rad');
set(gca,'xaxislocation','bottom','yaxislocation','right','position',position);
set(gca,'yticklabel',[]);
h = legend('sin\theta');
set(h,'box','off'); %不画方框
set(gca,'Linewidth',2,'Fontsize',20,'box','on');