MATLAB矩阵测试结果

for m=1:2:200
k=fix(sqrt(m));
for i=2:k+1
if(rem(m,i))==0;
break;
end
end
if i>=k+1
disp(int2str(m));
end
end
1
3
5
7
11
13
17
19
23
29
31
37
41
43
47
53
59
61
67
71
73
79
83
89
97
101
103
107
109
113
127
131
137
139
149
151
157
163
167
173
179
181
191
193
197
199
sum=0
i=1;
while i<1000
sum=sum+i;
i=i+1;
end
sum

sumchen

sum =

 0

sum =

  499500

a(1,1)={[2 2;1 1]};
a(1,2)={[0 0]};
a(2,1)={‘cbcb’};
a(2,2)={3+j};
a
celldisp(a)

UnitArray

a =

2×2 cell 数组

{2×2 double}    {1×2 double        }
{'cbcb'    }    {[3.0000 + 1.0000i]}

a{1,1} =

 2     2
 1     1

a{2,1} =

cbcb

a{1,2} =

 0     0

a{2,2} =

3.0000 + 1.0000i

celldisp(a(1,1))

ans{1} =

 2     2
 1     1

celldisp(a(1,2))

ans{1} =

 0     0

a(1,1)

ans =

1×1 cell 数组

{2×2 double}

cell(2,2)

ans =

2×2 cell 数组

{0×0 double}    {0×0 double}
{0×0 double}    {0×0 double}

a{1,1}

ans =

 2     2
 1     1

x=-1:0.1:1;
y=-1:0.1:1;
z=cos(x).*sin(y);
m=[x;y;z];
surf(m)
在这里插入图片描述

x=-1:0.1:1;
y=-1:0.1:1;
z=sin(x).*sin(y);
m=[x;y;z];
surf(m)
在这里插入图片描述

x=-1:0.1:1;
y=-1:0.1:1;
z=cos(x).*cos(y);
m=[x;y;z];
surf(m)
在这里插入图片描述

x=-2:0.1:2;
y=-2:0.1:2;
z=cos(x).*cos(y);
m=[x;y;z];
surf(m)
在这里插入图片描述

x=-1:0.1:1;
y=-1:0.1:1;
z=tan(x).*cos(y);
m=[x;y;z];
surf(m)
在这里插入图片描述

x=-1:0.1:1;
y=-1:0.1:1;
z=cot(x).*csc(y);
m=[x;y;z];
surf(m)

在这里插入图片描述

x=-1:0.1:1;
y=-1:0.1:1;
z=tan(x).*sin(y);
m=[x;y;z];
surf(m)
在这里插入图片描述

x=-1:0.1:1;
y=-1:0.1:1;
z=cot(x).*cos(y);
m=[x;y;z];
surf(m)
在这里插入图片描述

x=-1:0.1:1;
y=-1:0.1:1;
z=sec(x).*tan(y);
m=[x;y;z];
surf(m)
在这里插入图片描述

x=-1:0.1:1;
y=-1:0.1:1;
z=csc(x).*sin(y);
m=[x;y;z];
surf(m)
在这里插入图片描述

x=-1:0.1:1;
y=-1:0.1:1;
z=sec(x).*cos(y);
m=[x;y;z];
surf(m)
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值