matlab语句逐行注释 plot([0 100],[51/100 51/100],':k') plot([49*11/10 49*11/10],[51/100 0],':k')x = 0:10;p = (100 - 19/11 * x) / 100;figurhold onplot(x,p,'LineWidth',2)plot([0 100],[51/100 51/100],':k')plot([49*11/10 49*11/10],[51/100 0],':k
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/06 05:01:42
matlab语句逐行注释 plot([0 100],[51/100 51/100],':k') plot([49*11/10 49*11/10],[51/100 0],':k')x = 0:10;p = (100 - 19/11 * x) / 100;figurhold onplot(x,p,'LineWidth',2)plot([0 100],[51/100 51/100],':k')plot([49*11/10 49*11/10],[51/100 0],':k
matlab语句逐行注释 plot([0 100],[51/100 51/100],':k') plot([49*11/10 49*11/10],[51/100 0],':k')
x = 0:10;
p = (100 - 19/11 * x) / 100;
figur
hold on
plot(x,p,'LineWidth',2)
plot([0 100],[51/100 51/100],':k')
plot([49*11/10 49*11/10],[51/100 0],':k')
xlabel('n_{b1}','FontName','Times New Roman' ,'FontAngle','italic');
ylabel('p_2','FontName','Times New Roman','FontAngle','italic');
set(gcf,'Position',[533 311 366 255])
matlab语句逐行注释 plot([0 100],[51/100 51/100],':k') plot([49*11/10 49*11/10],[51/100 0],':k')x = 0:10;p = (100 - 19/11 * x) / 100;figurhold onplot(x,p,'LineWidth',2)plot([0 100],[51/100 51/100],':k')plot([49*11/10 49*11/10],[51/100 0],':k
x = 0:10; % 生成向量[0,1,2, ...,10]
p = (100 - 19/11 * x) / 100; % 计算 p
figure % 新开一个作图窗口
hold on % 在已有图的基础上画新图
plot(x,p,'LineWidth',2) % 画p(x)函数的图
plot([0 100],[51/100 51/100], ':k') % 画1条线段 黑色
plot([49*11/10 49*11/10], [51/100 0], ':k') % % 画1条线段 黑色
xlabel('n_{b1}', 'FontName','Times New Roman' , 'FontAngle', 'italic');%x轴标注
ylabel('p_2', 'FontName', 'Times New Roman','FontAngle', 'italic');%y轴标注
set(gcf, 'Position', [533 311 366 255]) % 移动作图窗口到屏幕[533 311 366 255]处