Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >> [pie*ones(1,5);ones(1,5);zeros(1,5):ones(1,5)]
- Error using pie (line 65)
- Not enough input arguments.
- >> [pi*ones(1,5);ones(1,5);zeros(1,5):ones(1,5)]
- Error using vertcat
- Dimensions of arrays being concatenated are not consistent.
- >> [pi*ones(1,5);ones(1,5);zeros(1,5);ones(1,5)]
- ans =
- 3.1416 3.1416 3.1416 3.1416 3.1416
- 1.0000 1.0000 1.0000 1.0000 1.0000
- 0 0 0 0 0
- 1.0000 1.0000 1.0000 1.0000 1.0000
- >> format rat
- >> [pi*ones(1,5);ones(1,5);zeros(1,5);ones(1,5)]
- ans =
- 355/113 355/113 355/113 355/113 355/113
- 1 1 1 1 1
- 0 0 0 0 0
- 1 1 1 1 1
- >> format short
- >> [pi*ones(1,5);ones(1,5);zeros(1,5);ones(1,5)]
- ans =
- 3.1416 3.1416 3.1416 3.1416 3.1416
- 1.0000 1.0000 1.0000 1.0000 1.0000
- 0 0 0 0 0
- 1.0000 1.0000 1.0000 1.0000 1.0000
- >> eye(3)*5
- ans =
- 5 0 0
- 0 5 0
- 0 0 5
- >> eye
- ans =
- 1
- >> eye*sqrt
- Error using sqrt
- Not enough input arguments.
- >> eye*sqrt(4)
- ans =
- 2
- >> [sqrt(2)*ones(3)]
- ans =
- 1.4142 1.4142 1.4142
- 1.4142 1.4142 1.4142
- 1.4142 1.4142 1.4142
- >> [sqrt(2)*ones(3)]
- ans =
- 1.4142 1.4142 1.4142
- 1.4142 1.4142 1.4142
- 1.4142 1.4142 1.4142
- >> format short
- >> [sqrt(2)*ones(3)]
- ans =
- 1.4142 1.4142 1.4142
- 1.4142 1.4142 1.4142
- 1.4142 1.4142 1.4142
- >> [sqrt(2)*ones(3)[2*eye(3),zeros(3,2)ones(1,5)]
- [sqrt(2)*ones(3)[2*eye(3),zeros(3,2)ones(1,5)]
- ↑
- Error: Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
- >> [2*eye(3),zeros(3,2)ones(1,5)]
- [2*eye(3),zeros(3,2)ones(1,5)]
- ↑
- Error: Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct
- matrices, use brackets instead of parentheses.
- Did you mean:
- >> [2*eye(3),zeros(3,2)*ones(1,5)]
- Error using *
- Incorrect dimensions for matrix multiplication. Check that the number of columns in the first matrix matches the number of rows in the second
- matrix. To perform elementwise multiplication, use '.*'.
- >> [2*eye(3),zeros(3,2);ones(1,5)]
- ans =
- 2 0 0 0 0
- 0 2 0 0 0
- 0 0 2 0 0
- 1 1 1 1 1
- >> eye(3,4)
- ans =
- 1 0 0 0
- 0 1 0 0
- 0 0 1 0
- >> b(3,4)
- Undefined function or variable 'b'.
- >> d
- Undefined function or variable 'd'.
- >> ad
- Undefined function or variable 'ad'.
- >> d
- Undefined function or variable 'd'.
- >> A=(3,4)
- A=(3,4)
- ↑
- Error: Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
- >> spencerandagan@yahoo.com
- 'yahoo.com' is not a valid base class.
- >> gg angnato
- Undefined function or variable 'gg'.
- >> rekta singko
- Undefined function or variable 'rekta'.
- >> haahaha joke
- Undefined function or variable 'haahaha'.
- >> magic(3),pascal(3)
- ans =
- 8 1 6
- 3 5 7
- 4 9 2
- ans =
- 1 1 1
- 1 2 3
- 1 3 6
- >> A(3,4)magic(3),pascal(3)
- A(3,4)magic(3),pascal(3)
- ↑
- Error: Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct
- matrices, use brackets instead of parentheses.
- Did you mean:
- >> A(3,4)*magic(3), pascal(3)
- Undefined function or variable 'A'.
- >> A=(3,4)*magic(3), pascal(3)
- A=(3,4)*magic(3), pascal(3)
- ↑
- Error: Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
- >> (3,4)*magic(3), pascal(3)
- (3,4)*magic(3), pascal(3)
- ↑
- Error: Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
- >> A=(3,4)B=*magic(3), pascal(3)
- A=(3,4)B=*magic(3), pascal(3)
- ↑
- Error: Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
- >> A=*(3,4)*magic(3), pascal(3)
- A=*(3,4)*magic(3), pascal(3)
- ↑
- Error: Invalid use of operator.
- >> A[2,1]
- A[2,1]
- ↑
- Error: Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
- >> A[3;4],1:2]
- A[3;4],1:2]
- ↑
- Error: Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
- >> A = magic(3)
- A =
- 8 1 6
- 3 5 7
- 4 9 2
- >> B = pascal (3)
- B =
- 1 1 1
- 1 2 3
- 1 3 6
- >> a=[A,B]
- a =
- 8 1 6 1 1 1
- 3 5 7 1 2 3
- 4 9 2 1 3 6
- >> eye(3)*5
- ans =
- 5 0 0
- 0 5 0
- 0 0 5
- >> a(3,4)
- ans =
- 1
- >> [a(1,1)a(1,6);a(3,1),a(3,6)]
- [a(1,1)a(1,6);a(3,1),a(3,6)]
- ↑
- Error: Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct
- matrices, use brackets instead of parentheses.
- Did you mean:
- >> [a(1,1)*a(1,6); a(3,1), a(3,6)]
- Error using vertcat
- Dimensions of arrays being concatenated are not consistent.
- >> [a(1,1) a(1,6); a(3,1), a(3,6)]
- ans =
- 8 1
- 4 6
- >> [a(3,1), a(3,2), a(3,3), a(3,4), a(3,5), a(3,6)]
- ans =
- 4 9 2 1 3 6
- >> [a(1,3); a(2,3); a(3,3)]
- ans =
- 6
- 7
- 2
- >> a(:,3)
- ans =
- 6
- 7
- 2
- >> [a(1,1); a(1,2); a(3,3)]
- ans =
- 8
- 1
- 2
- >> awit
- Undefined function or variable 'awit'.
- >> diag(A)
- ans =
- 8
- 5
- 2
- >> a(3,4)
- ans =
- 1
- >> diag(diag(a)
- diag(diag(a)
- ↑
- Error: Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
- Did you mean:
- >> diag(diag(a))
- ans =
- 8 0 0
- 0 5 0
- 0 0 2
- >> A=[sqrt(5),i,2*sqrt(3);-3/4,0,1;1/-3,4i,-i]
- A =
- 2.2361 + 0.0000i 0.0000 + 1.0000i 3.4641 + 0.0000i
- -0.7500 + 0.0000i 0.0000 + 0.0000i 1.0000 + 0.0000i
- -0.3333 + 0.0000i 0.0000 + 4.0000i 0.0000 - 1.0000i
- >> format rat
- >> A=[sqrt(5),i,2*sqrt(3);-3/4,0,1;1/-3,4i,-i]
- A =
- 2889/1292 + 0i 0 + 1i 1351/390 + 0i
- -3/4 + 0i 0 + 0i 1 + 0i
- -1/3 + 0i 0 + 4i 0 - 1i
- >> format short
- >> A=[sqrt(5),i,2*sqrt(3);-3/4,0,1;1/-3,4i,-i]
- A =
- 2.2361 + 0.0000i 0.0000 + 1.0000i 3.4641 + 0.0000i
- -0.7500 + 0.0000i 0.0000 + 0.0000i 1.0000 + 0.0000i
- -0.3333 + 0.0000i 0.0000 + 4.0000i 0.0000 - 1.0000i
- >> B=[4*2,2/3;1/201,5-8.2;0.0001,(9+4)/3]
- B =
- 8.0000 0.6667
- 0.0050 -3.2000
- 0.0001 4.3333
- >> a=[A,B]
- a =
- 2.2361 + 0.0000i 0.0000 + 1.0000i 3.4641 + 0.0000i 8.0000 + 0.0000i 0.6667 + 0.0000i
- -0.7500 + 0.0000i 0.0000 + 0.0000i 1.0000 + 0.0000i 0.0050 + 0.0000i -3.2000 + 0.0000i
- -0.3333 + 0.0000i 0.0000 + 4.0000i 0.0000 - 1.0000i 0.0001 + 0.0000i 4.3333 + 0.0000i
- >>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement