⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 diary

📁 胡广书著的《现代信号处理教程》一书的例子的源码。都是Matlab程序。
💻
📖 第 1 页 / 共 4 页
字号:
    0.5000    0.3333    0.2500    0.2000
    0.3333    0.2500    0.2000    0.1667
    0.2500    0.2000    0.1667    0.1429

d = 'dcd';
eval(d)
??? Undefined function or variable 'dcd'.

B = cell(1,3)

B = 

     []     []     []

B{1,1} = 1:4

B = 

    [1x4 double]     []     []

B{1}

ans =

     1     2     3     4

A = [1,2; 4,5]

A =

     1     2
     4     5

cellfun('islogical',B)

ans =

     0     0     0

celldisp(B)
 
B{1} =
 
     1     2     3     4

 
 
B{2} =
 
     []
 
 
B{3} =
 
     []
 
cellplot(B)
A.a1='aa';
A.qw=4;
A

A = 

    a1: 'aa'
    qw: 4

C = struct('c1', B, 'abggf')
??? Error using ==> struct
Field and value input arguments must come in pairs.

edit('struct');
??? Error using ==> edit
Can't edit the built-in function 'struct'.

c
??? Undefined function or variable 'c'.

C
??? Undefined function or variable 'C'.

C = struct('c1',  'abggf')

C = 

    c1: 'abggf'

C = struct('c1', A, 'abggf')
??? Error using ==> struct
Field and value input arguments must come in pairs.

C = struct('c1', A, 'abggf')
??? Error using ==> struct
Field and value input arguments must come in pairs.


C

C = 

    c1: 'abggf'

C.c1 = B

C = 

    c1: {[1 2 3 4]  []  []}

isfield(c)
??? Undefined function or variable 'c'.

isfield(C)
??? Input argument 'f' is undefined.

Error in ==> C:\MATLAB6p5\toolbox\matlab\datatypes\isfield.m
On line 12  ==>   tf = any(strcmp(fieldnames(s),f));

iscell(C)

ans =

     0

fieldnames(C)

ans = 

    'c1'

isstruct(C)

ans =

     1

a1 = linspace(1, 100, 6)

a1 =

    1.0000   20.8000   40.6000   60.4000   80.2000  100.0000

99/5

ans =

   19.8000

a2 = logspace(0,5, 6)

a2 =

           1          10         100        1000       10000      100000

a1 -1

ans =

         0   19.8000   39.6000   59.4000   79.2000   99.0000

a1 =a2

a1 =

           1          10         100        1000       10000      100000

a1 +a2\
??? a1 +a2\
           |
Error: Expected a variable, function, or constant, found "end of line".

a1 +a2

ans =

           2          20         200        2000       20000      200000

a = [1 2 3]

a =

     1     2     3

b = [3 4 5]

b =

     3     4     5

dot (a, b)

ans =

    26

a.*b

ans =

     3     8    15

sum(a.*b)

ans =

    26

c = cross(a,b)

c =

    -2     4    -2

dot (a, b)

ans =

    26

c = cross(a,b)

c =

    -2     4    -2

dot (a, b)

ans =

    26

a.*b

ans =

     3     8    15

a.*b

ans =

     3     8    15

c = cross(a,b)

c =

    -2     4    -2

rand('seed', 12);
a = rand(100) +1.e8;
x = ones(100,1);
b =a*x

b =

  1.0e+010 *

    1.0000
    1.0000
    1.0000
    1.0000
    1.0000
    1.0000
    1.0000
    1.0000
    1.0000
    1.0000
    1.0000
    1.0000
    1.0000
    1.0000
    1.0000
    1.0000

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -