最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

matlab

2023-03-27 23:38 作者:奇奇怪怪的胡桃  | 我要投稿

1.

clc;

clear all;

A=magic(4)

?

?

A = {magic(5),'Good luck';100,1:10}

B=[{magic(5)},{'Good luck'};{100},{1:10}]

C={10}

C(4,4)={20}

isequal(A,B)

whos

?

k=cell(2,2)

a(1,1)={[1 3 6;4 7 9;2 5 8]};

a(1,2)={'Hello'};

a(2,1)={(0:0.2:pi)};

a(2,2)={52};

L=[a,k]

M=[a;k]

?

2.

P=[1,-22,5,700];

r=roots(P)

?

3.

syms x

A=5*x^2-9*x-100;

solve(A)

?

4.

t=-pi:0.1:pi;

y=sin(t);

z=cos(t);

figure(1),plot(t,y,'Linewidth',2)

hold on

plot(t,z,'ro')

xlabel('t')

ylabel('y')

title('正弦與余弦函數(shù)')

legend('sin','cos')

hold off

?

5.

x=0:0.1:8;y=5*x.^3; ????????????????

subplot(2,2,1);plot(x,y) ?????????????????????????????

title('線性坐標(biāo)圖')

subplot(2,2,2);semilogx(x,y,'r-.') ?????????????????

title('半對數(shù)坐標(biāo)圖x')

subplot(2,2,3);semilogy(x,y,'g-') ?????????????????

title('半對數(shù)坐標(biāo)圖y')

subplot(2,2,4);loglog(x,y,'c--') ????????????????

title('雙對數(shù)坐標(biāo)圖')

?

6.

n=0:5;

y=2*n;

m=length(n);

for i=1:m

????z(i)=y(m-i+1); ?????????????%翻轉(zhuǎn)值

end

nz=-n; ???????????????????????%翻轉(zhuǎn)值的坐標(biāo)

nd=2; ????????????????????????%y向右移動2位

nyz=1:nd;

ny=[n n(end)+nyz]; ?????????????%y移位后其自變量的值

yd=[zeros(1,nd),y];

?

figure(1),

subplot(131),stem(n,y)

xlabel('n')

title('y')

subplot(132),stem(nz,z)

xlabel('n')

title('y的翻轉(zhuǎn)值')

subplot(133),stem(ny,yd)

xlabel('n')

title('y右移2位')

?

?


matlab的評論 (共 條)

分享到微博請遵守國家法律
大埔区| 吉木萨尔县| 仙游县| 商丘市| 湘乡市| 双城市| 耿马| 游戏| 白山市| 榕江县| 嘉兴市| 鹰潭市| 和平区| 青龙| 宜川县| 化德县| 竹北市| 枣庄市| 香格里拉县| 长垣县| 临沂市| 亳州市| 洮南市| 玉田县| 贡嘎县| 德格县| 平阳县| 永嘉县| 雅江县| 石柱| 宝清县| 简阳市| 通江县| 莎车县| 西贡区| 门头沟区| 永修县| 红桥区| 扶绥县| 萝北县| 威信县|