matlab中怎么将将原始数据转换成整数数据

img

img

img

这样转换对吗,还有什么转化方法吗
这个警告是什么意思,接下来strip函数应该怎么写

  • 可以查看手册:matlab 删除字符串中的前导和尾部字符 strip 中的内容
  • 除此之外, 这篇博客: 使用MATLAB画上下两个横坐标与左右两个纵坐标中的 同一条曲线对应两个坐标轴 部分也许能够解决你的问题, 你可以仔细阅读以下内容或跳转源博客中阅读:
  • 使用位置设置让两个坐标系叠在一起:
    position = [0.15 0.2 0.75 0.6];
    set(gca,‘xaxislocation’,‘top’,‘yaxislocation’,‘left’,‘position’,position);
    sin\theta

    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');