作业帮 > 综合 > 作业

matlab语句逐行注释 plot([0 100],[51/100 51/100],':k') plot([49*11/

来源:学生作业帮 编辑:拍题作业网作业帮 分类:综合作业 时间:2024/05/09 14:08:05
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])
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]处