Вы находитесь на странице: 1из 7

03/04/18 15:02 MATLAB Command Window 1 of 7

Classroom License -- for classroom instructional use only.

>> A=[8 12 15]

A =

8 12 15

>> B=[-2 6 5]

B =

-2 6 5

>> A./B

ans =

-4 2 3

>> DeltaX=[560 440 490]

DeltaX =

560 440 490

>> DetaT=[10.3 8.2 9.1]

DetaT =

10.3000 8.2000 9.1000

>> Vm=DeltaX./DeltaT
Undefined function or variable 'DeltaT'.

Did you mean:


>> Vm=DeltaX./DetaT

Vm =

54.3689 53.6585 53.8462

>> DeltaX=[560 440 490]

DeltaX =

560 440 490

>> DeltaX=[560 440 490]


03/04/18 15:02 MATLAB Command Window 2 of 7

DeltaX =

560 440 490

>> DetaT=[10.3 8.2 9.1]

DetaT =

10.3000 8.2000 9.1000

>> DeltaX=[560 440 490]

DeltaX =

560 440 490

>> DeltaX=[560 440 490];


>> DetaT=[10.3 8.2 9.1];
>> N=3;
>> for i=1:N
V(i)=deltaX/DetaT;
end
Undefined function or variable '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'.

Did you mean:


>> 3.^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]

L =

10 20 30 40 50 60

>> J.^L

ans =

1.0e+46 *

0.0000 0.0000 0.0000 0.0000 0.0000 4.8874

>> Dist= [ 560 440 490 530 370];


>> Temp = [ 10.3 8.2 9.1 10.1 7.5];
>> Vm=Dist./Temp
03/04/18 15:02 MATLAB Command Window 4 of 7

Vm =

54.3689 53.6585 53.8462 52.4752 49.3333

>> 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

>> help max


max Largest component.
For vectors, max(X) is the largest element in X. For matrices,
max(X) is a row vector containing the maximum element from each
column. For N-D arrays, max(X) operates along the first
non-singleton dimension.

[Y,I] = max(X) returns the indices of the maximum values in vector I.


If the values along the first non-singleton dimension contain more
than one maximal element, the index of the first one is returned.

max(X,Y) returns an array with the largest elements taken from X or Y.


X and Y must have compatible sizes. In the simplest cases, they can be
the same size or one can be a scalar. Two inputs have compatible sizes
if, for every dimension, the dimension sizes of the inputs are either
the same or one of them is 1.

[Y,I] = max(X,[],DIM) operates along the dimension DIM.

When X is complex, the maximum is computed using the magnitude


max(ABS(X)). In the case of equal magnitude elements, then the phase
angle max(ANGLE(X)) is used.

max(...,NANFLAG) specifies how NaN (Not-A-Number) values are treated.


03/04/18 15:02 MATLAB Command Window 5 of 7

NANFLAG can be:


'omitnan' - Ignores all NaN values and returns the maximum of the
non-NaN elements. If all elements are NaN, then the
first one is returned.
'includenan' - Returns NaN if there is any NaN value. The index points
to the first NaN element.
Default is 'omitnan'.

Example:
X = [2 8 4; 7 3 9]
max(X,[],1)
max(X,[],2)
max(X,5)

See also min, cummax, median, mean, sort.

Reference page for max


Other functions named max

>> [higheat_speed,route]=max(Vm)

higheat_speed =

54.3689

route =

>> R(ohm)= [ 10^4 2*(10^4) 3.5*(10^4) 10^5


R(ohm)= [ 10^4 2*(10^4) 3.5*(10^4) 10^5];
R(ohm)= [ 10^4 2*(10^4) 3.5*(10^4) 10^5];

Error: The expression to the left of the equals sign is not a valid target for an
assignment.

>> R(ohm)= [ 10^4 2*(10^4) 3.5*(10^4) 10^5]


Undefined function or variable 'ohm'.

>> R= [ 10^4 2*(10^4) 3.5*(10^4) 10^5];


>> V= [ 123 80 110 200 350];
>> I=V./R
Matrix dimensions must agree.

>> R= [ 10^4 2*(10^4) 3.5*(10^4) 10^5];


>> V= [ 120 80 110 200 350];
>> R= [ 10^4 2*(10^4) 3.5*(10^4) 10^5 2*(10^5)];
>> V= [ 120 80 110 200 350];
>> I=V./R
03/04/18 15:02 MATLAB Command Window 6 of 7

I =

0.0120 0.0040 0.0031 0.0020 0.0018

>> (corrente max, route)=max(I)


(corrente max, route)=max(I)

Error: Unexpected MATLAB expression.

>> (corrente max, route)=max(I)


(corrente max, route)=max(I)

Error: Unexpected MATLAB expression.

>> (corrente hig, route)=max(I)


(corrente hig, route)=max(I)

Error: Unexpected MATLAB expression.

>> (higeart, route)=max(I)


(higeart, route)=max(I)

Error: Expression or statement is incorrect--possibly unbalanced (, {, or [.

>> (higeart, route)=max(I)


(higeart, route)=max(I)

Error: Expression or statement is incorrect--possibly unbalanced (, {, or [.

>> 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.
03/04/18 15:02 MATLAB Command Window 7 of 7

>> 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 =

1.4400 0.3200 0.3457 0.4000 0.6125

>> =(Vr^2)= 300^2 + 150^2 - 2*300*150*cos(pi/4)


=(Vr^2)= 300^2 + 150^2 - 2*300*150*cos(pi/4)

Error: The expression to the left of the equals sign is not a valid target for an
assignment.

>> Vr= 300^2 + 150^2 - 2*300*150*cos(pi/4)

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'.

>> sqrt (Vr)

ans =

221.0439

>>

Вам также может понравиться