Está en la página 1de 4

c=[3 4 5 6;7 8 9 10; 10 1 5 7; 12 10 11 9]

c=

9 10

10

12 10 11

7
9

>> c(3;1)
??? c(3;1)
|
Error: Unbalanced or unexpected parenthesis or bracket.

>> c(3:1)

ans =

Empty matrix: 1-by-0

>> A=[linspace(-1,6,5);0:4;0.5:0.1:0.9;linspace(3,6,5);9:-2:1]

A=

-1.0000 0.7500 2.5000 4.2500 6.0000


0 1.0000 2.0000 3.0000 4.0000
0.5000 0.6000 0.7000 0.8000 0.9000

3.0000 3.7500 4.5000 5.2500 6.0000


9.0000 7.0000 5.0000 3.0000 1.0000

>> B=[0 0 0 0; linspace(1,5,4);1:4;2;0.5:3.0]


??? Error using ==> vertcat
CAT arguments dimensions are not consistent.

>> max(max(A))

ans =

>> sum(sum(A<max(max(A))))

ans =

24

>> c=(A<max(max(A)))

c=

>> A.*C
??? Undefined function or variable 'C'.

>> A.*c

ans =

-1.0000 0.7500 2.5000 4.2500 6.0000


0 1.0000 2.0000 3.0000 4.0000
0.5000 0.6000 0.7000 0.8000 0.9000
3.0000 3.7500 4.5000 5.2500 6.0000
0 7.0000 5.0000 3.0000 1.0000

>> sum(sum(A.*c))

ans =

64.5000

>> sum(sum(A>mean(mean(A))))

ans =

13

>> sum(size(A)-min(size(A))/sum(size(5))-min(5)
??? sum(size(A)-min(size(A))/sum(size(5))-min(5)
|
Error: Expression or statement is incorrect--possibly unbalanced (, {, or [.

>>