?? right_mtimes.m
字號:
function n = right_mtimes(x, k)% Helper function for mtimes.m%% if x is a scalar, use the property that% kron(A, B) * x = kron(x * A, B)%% if x is a vector such that x = vec(X)',% use the property that% x * kron(A, B) = vec(B' * X * A)'%kasize = size(k.a);kbsize = size(k.b);xsize = size(x);if (length(x) == 1) n = kronMatrix(k.a * x, k.b);else try n = zeros(xsize(1), kasize(2) * kbsize(2)); for i = 1 : xsize(1) tmp = reshape(x(i,:), kbsize(1), kasize(1)); tmp = k.b' * tmp * k.a; n(i,:) = reshape(tmp, 1, kbsize(2) * kasize(2)); end catch error(lasterr) endend
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -