%%% 条形图
x =[2021,2022,2023];
y =[10,20;20,30;100,200];bar(x,y);
histogram 直方图
%%% 直方图
x =randn(1000,1);
nbins =25;
h =histogram(x,nbins);
counts = h.Values;
pie 饼图
%%%饼图
x =[1:2:9];% 从1开始每次+2, 13579pie(x);
scatter 散点图
%%%散点图
t =0:pi/50:2*pi %每次+0.0628
x =16*sin(t).^3;
y =13*cos(t)-5*cos(2*t)-2*cos(3*t)-cos(4*t);scatter(x,y,'yellow','filled');
quiver 矢量类图形
%%%矢量类图形
A =[4,5];quiver(0,0,A(1),A(2));
属性设置
%%% 属性设置
x =linspace(0,2*pi,200);
y =[sin(x);sin(2*x);sin(0.5*x)];plot(x,y)%横纵坐标限制
axis([0,6.5,-1.5,1.5]);%标题
title("三个正弦函数y=sin{\theta}","FontSize",15);xlabel("X");ylabel("Y","Rotation",0);% 文字说明
text(2.5,sin(2.5),'sin(x)');text(2.5,sin(2*2.5),'sin(2x)');%图例
legend('sin(x)','sin(2*x)','sin(0.5x)');
图形保持
%%
% 图形保持
t = linspace(0,2*pi,200);
x = sin(t);
y = cos(t);
plot(x,y,'b');
axis equal;%横坐标与纵坐标相等
hold on;
x1 =2*sin(t);
y1 =2*cos(t);
plot(x1,y1,'r');
添加图形标注
%%%课后小练
% 已知向量A、B,求A+B,用矢量图表示并用所学知识添加图形标注
% A =[4,5];% B =[-10,10];
A =[4,5];
B =[-10,10];
C = A + B;quiver(0,0,A(1),A(2));
hold on;quiver(0,0,B(1),B(2));quiver(0,0,C(1),C(2));
hold off;title("矢量相加");xlabel("X");ylabel("Y","Rotation",0);text(A(1),A(2),'A');text(B(1),B(2),'B');text(C(1),C(2),'C');
grid on;%显示网格线
1、实现功能 限制ListBox显示的最大条数; ListBox自动滚动,显示最新行; 2、C#代码
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using Syst…