Professional Documents
Culture Documents
A =
8 12 15
>> B=[-2 6 5]
B =
-2 6 5
>> A./B
ans =
-4 2 3
DeltaX =
DetaT =
>> Vm=DeltaX./DeltaT
Undefined function or variable 'DeltaT'.
Vm =
DeltaX =
DeltaX =
DetaT =
DeltaX =
>> v
Undefined function or variable 'v'.
>> test_for
Undefined function or variable 'test_for'.
>> y=[ 3 2]
y =
3 2
>> x=[pi/2,pi/6]
x =
1.5708 0.5236
>> z=exp(y)*sin(x)
Error using *
Inner matrix dimensions must agree.
>> z=exp(y)*sin(x)
Error using *
Inner matrix dimensions must agree.
>> z=exp(y).*sin(x)
03/04/18 15:02 MATLAB Command Window 3 of 7
z =
20.0855 3.6945
>> P=[ 4 5 9]
P =
4 5 9
>> P.^3
ans =
64 125 729
>> 3.^p
Undefined function or variable 'p'.
ans =
81 243 19683
>> J=[ 1 2 3 4 5 6]
J =
1 2 3 4 5 6
L =
10 20 30 40 50 60
>> J.^L
ans =
1.0e+46 *
Vm =
>> max(Vm)=
max(Vm)=
↑
Error: Expression or statement is incomplete or incorrect.
>> max(Vm)
ans =
54.3689
>> min(Temp)
ans =
7.5000
>> max(Dist)
ans =
560
Example:
X = [2 8 4; 7 3 9]
max(X,[],1)
max(X,[],2)
max(X,5)
>> [higheat_speed,route]=max(Vm)
higheat_speed =
54.3689
route =
I =
>> P=R*(I^2)
Error using ^
Inputs must be a scalar and a square matrix.
To compute elementwise POWER, use POWER (.^) instead.
>> P=R*(I^.2)
Error using ^
Inputs must be a scalar and a square matrix.
To compute elementwise POWER, use POWER (.^) instead.
>> P=R.*(I^.2)
Error using ^
Inputs must be a scalar and a square matrix.
To compute elementwise POWER, use POWER (.^) instead.
>> P=U.*I
Undefined function or variable 'U'.
>> P= R.*(I^2)
Error using ^
Inputs must be a scalar and a square matrix.
To compute elementwise POWER, use POWER (.^) instead.
>> power=V.^2./R
power =
Vr =
4.8860e+04
>> sqrt(Vr)=
sqrt(Vr)=
↑
Error: Expression or statement is incomplete or incorrect.
>> sqrt(Vr)=
sqrt(Vr)=
↑
Error: Expression or statement is incomplete or incorrect.
>> sqrt{Vr}
Undefined variable "sqrt" or class "sqrt".
>> sqrt Vr
Undefined function 'sqrt' for input arguments of type 'char'.
ans =
221.0439
>>