Sunteți pe pagina 1din 19

To get started, select MATLAB Help or Demos from the Help menu.

Warning: Unable to register DirectX component


C:\MATLAB701\toolbox\matlab\audiovideo\private\MatlabDataSink.dll

Warning: Unable to register DirectX component


C:\MATLAB701\toolbox\matlab\audiovideo\private\MatlabDataSource.dll

Warning: Could not evaluate 'C:\MATLAB701\toolbox\vipblks\vipblks\prefspanel.m'. Error Message:


Error using ==> initprefs

Unable to register DirectX component


C:\MATLAB701\toolbox\matlab\audiovideo\private\MatlabDataSink.dll

> In initprefs at 34

In matlabrc at 108

>> koef=[2 1 3 ; 2 3 -2 ; 1 3 -1]; konst=[13 ; 2 ; 4];

>> abc=koef\konst

abc =

>> F=@(x) [2*x(1).^2 + x(2) - 4; x(1).^3 + 2*x(2).^2-9};

??? F=@(x) [2*x(1).^2 + x(2) - 4; x(1).^3 + 2*x(2).^2-9};

Error: Unbalanced or misused parentheses or brackets.

>> F=@(x) [2*x(1).^2 + x(2) - 4; x(1).^3 + 2*x(2).^2 - 9};

??? F=@(x) [2*x(1).^2 + x(2) - 4; x(1).^3 + 2*x(2).^2 - 9};


|

Error: Unbalanced or misused parentheses or brackets.

>> F=@(x) [2*x(1).^2 + x(2) - 4; x(1).^3 + 2*x(2).^2 - 9];

>>

>>

>>

>> F=@(x) [2*x(1).63 + x(1).^2 + x(2).^3 + 2*x(2).^2 - 19; x(1).^2 + x(2).^2 + 0.5*x(1).*x(2) - 6];

??? F=@(x) [2*x(1).63 + x(1).^2 + x(2).^3 + 2*x(2).^2 - 19; x(1).^2 + x(2).^2 + 0.5*x(1).*x(2) - 6];

Error: Missing MATLAB operator.

>> F=@(x) [2*x(1).^3 + x(1).^2 + x(2).^3 + 2*x(2).^2 - 19; x(1).^2 + x(2).^2 + 0.5*x(1).*x(2) - 6];

>> xy=fsolve(F, [1 3]); a=xy(1),

Optimization terminated: first-order optimality is less than options.TolFun.

a=

1.0000

>> x=[0 1 2 3 4 5] , y=[1 9 17 25 33 41]

x=

0 1 2 3 4 5
y=

1 9 17 25 33 41

>> a=sum(x.*y)/sum(x.^2)

a=

8.2727

>> a=x'\y'

a=

8.2727

>> ab=polyfit(x,y,1)

ab =

8.0000 1.0000

>> ab=[x' ones(size(x))]\y'

??? Error using ==> horzcat

All matrices on a row in the bracketed expression must have the

same number of rows.


>> ab=[x' ones(size(x'))]\y'

ab =

8.0000

1.0000

>> abc=x'.^2 x' ones(size(x'))]\y'

??? abc=x'.^2 x' ones(size(x'))]\y'

Error: Missing MATLAB operator.

>> abc=[x'.^2 x' ones(size(x'))]\y'

abc =

0.0000

8.0000

1.0000

>> cos 5

??? Function 'cos' is not defined for values of class 'char'.

Error in ==> cos at 12

builtin('cos', varargin{:});

>> cos(1)
ans =

0.5403

>> cos(ans)

ans =

0.8576

>>

>>

>> cos(ans)

ans =

0.6543

>> cos(ans)

ans =

0.7935

>> cos(ans)
ans =

0.7014

>> cos(ans)

ans =

0.7640

>> cos(ans)

ans =

0.7221

>> cos(ans)

ans =

0.7504

>> cos(ans)

ans =

0.7314
>> cos(ans)

ans =

0.7442

>> cos(ans)

ans =

0.7356

>> cos(ans)

ans =

0.7414

>> cos(ans)

ans =

0.7375

>> cos(ans)
ans =

0.7401

>> cos(ans)

ans =

0.7384

>> cos(ans)

ans =

0.7396

>> cos(ans)

ans =

0.7388

>> cos(ans)

ans =

0.7393
>> cos(ans)

ans =

0.7389

>> cos(ans)

ans =

0.7392

>> cos(ans)

ans =

0.7390

>> cos(ans)

ans =

0.7391

>> cos(0.7391)
ans =

0.7391

>> f=@(x) cos(x)-x;

>> fzero(f,1)

ans =

0.7391

>> f=@(x)[x.^3-x-1];

>> fzero(f,1)

ans =

1.3247

>> fzero(f,4)

ans =

1.3247

>> fzero(f,100)

ans =
1.3247

>> fzero(f,-100)

ans =

1.3247

>> y=@(x) 1./x-3./(x.^2-1)+x.^3./(x.^2+4)-0.5; x0=fzero(y,40)

x0 =

-1.0000

>> fplot(y,[-10 10];grid on

??? fplot(y,[-10 10];grid on

Error: Incomplete or misformed expression or statement.

>> fplot(y,[-10 10]);grid on

>> fplot(y,[-4 4]);grid on

>> fplot(y,[-4 4]);grid on

>> P=[1 2 3 4]

P=
1 2 3 4

>> ROOTS(P)

Warning: Could not find an exact (case-sensitive) match for 'ROOTS'.


C:\MATLAB701\toolbox\matlab\polyfun\roots.m is a case-insensitive match and will be used
instead. You can improve the performance of your code by using exact name matches and we
therefore recommend that you update your usage accordingly. Alternatively, you can disable this
warning using warning('off','MATLAB:dispatcher:InexactMatch').

ans =

-1.6506

-0.1747 + 1.5469i

-0.1747 - 1.5469i

>> plot([-10:0.1:10],polyval(p,[-10:0.1:10]),'-r');grid on

??? Undefined function or variable 'p'.

>> plot([-10:0.1:10],polyval(P,[-10:0.1:10]),'-r');grid on

>> plot([-4:0.1:4],polyval(P,[-10:0.1:10]),'-r');grid on

??? Error using ==> plot

Vectors must be the same lengths.

>> plot([-4:0.1:4],polyval(P,[-4:0.1:4]),'-r');grid on

>> y=@(x) polyval(p,x)

??? Error: "p" is not the name of a function nor a variable,

but is used in an anonymous function either at the prompt or in the argument of EVAL.

>> y=@(x) polyval(P,x)


y=

@(x) polyval(P,x)

>> fzero(y,[-4 4])

ans =

-1.6506

>> y=@9x) x./(x^3+3)+log(x)-4; fzero(y,10)

??? y=@9x) x./(x^3+3)+log(x)-4; fzero(y,10)

Error: Missing MATLAB operator.

>> y=@(x) x./(x^3+3)+log(x)-4; fzero(y,10)

Exiting fzero: aborting search for an interval containing a sign change

because complex function value encountered during search.

(Function value at -2.8 is -2.8226+3.1416i.)

Check function or try again with a different starting value.

ans =

NaN

>> y=@(x) x./(x^3+3)+log(x)-4; fzero(y,100)


ans =

54.5798

>> y=@(x) x./(x^3+3)+log(x)-4; fzero(y,50)

ans =

54.5798

>> fplot(y,[-10 10]);grid on

Warning: Imaginary parts of complex X and/or Y arguments ignored.

> In fplot at 158

>> fplot(y,[-4 2]);grid on

Warning: Imaginary parts of complex X and/or Y arguments ignored.

> In fplot at 158

>> fplot(y,[-4 200]);grid on

Warning: Imaginary parts of complex X and/or Y arguments ignored.

> In fplot at 158

>> fplot(y,[-400 2]);grid on

Warning: Imaginary parts of complex X and/or Y arguments ignored.

> In fplot at 158

>> fzero(y,40)

ans =
54.5798

>> x=0:5;y=[0 14 96 176];

>> p4=polyfit(x,y,4)

??? Error using ==> polyfit

X and Y vectors must be the same size.

>> x=1:5;y=[0 14 96 176];

>> p4=polyfit(x,y,4)

??? Error using ==> polyfit

X and Y vectors must be the same size.

>> x=1:5;y=[0 14 44 96 176];

>> p4=polyfit(x,y,4)

p4 =

0.0000 1.0000 2.0000 1.0000 -4.0000

>> f=@(x) polyval(p4,x)-45;

>> fzero(f,0)

ans =

3.0248

>> q=polyint(p4);
>> f=@(b) polyval(q,b)-polyval(q,1)-3

f=

@(b) polyval(q,b)-polyval(q,1)-3

>> fzero(f,2)

ans =

1.7465

>> f=@(x) polyval(p4,x);

>> g=@(b) quad(f,1,b)-3;

>> fzero(g,5)

ans =

1.7465

>> v=[1:9 9.5]

v=

1.0000 2.0000 3.0000 4.0000 5.0000 6.0000 7.0000 8.0000 9.0000 9.5000

>> V=[1:9 9.5]


V=

1.0000 2.0000 3.0000 4.0000 5.0000 6.0000 7.0000 8.0000 9.0000 9.5000

>> t=[45 92 160 290 405 586 788 1060 1328 1520];

>> si=polyfit(V,t./V,1)

si =

14.1478 17.7074

>> V=V/1000

V=

0.0010 0.0020 0.0030 0.0040 0.0050 0.0060 0.0070 0.0080 0.0090 0.0095

>> si=

??? si=

Error: Incomplete or misformed expression or statement.

>> si=polyfit(V,t./V,1)

si =
1.0e+007 *

1.4148 0.0018

>> intercept=si(2)

intercept =

1.7707e+004

>> m=[V' ones(size(V'))];si=m\(t'./V')

si =

1.0e+007 *

1.4148

0.0018

>> slope=si(1)

slope =

1.4148e+007

>> intercept=si(1)
intercept =

1.4148e+007

>> plot(V,t./V,'or',V,slope*V+intercept,'-b');grid on

>> intercept=si(2)

intercept =

1.7707e+004

>> plot(V,t./V,'or',V,slope*V+intercept,'-b');grid on

>> legend(4,'Titik data filtrasi','Garis Filtrasi')

Warning: Plot empty.

> In legend at 239

>> plot(V,t./V,'or',V,slope*V+intercept,'-b');grid on

>> legend(4,'Titik data filtrasi','Garis Filtrasi')

>> title('

S-ar putea să vă placă și