Index-> contents reference index search external Previous Next Up-> ckbs utility ckbs_diag_solve diag_solve_ok.m ckbs-> license ckbs_t_general ckbs_nonlinear ckbs_L1_nonlinear ckbs_affine ckbs_affine_singular ckbs_L1_affine utility all_ok.m whatsnew wishlist bib utility-> ckbs_t_obj ckbs_t_grad ckbs_t_hess ckbs_diag_solve ckbs_bidiag_solve ckbs_bidiag_solve_t ckbs_blkbidiag_symm_mul ckbs_blkdiag_mul ckbs_blkdiag_mul_t ckbs_blkbidiag_mul_t ckbs_blkbidiag_mul ckbs_blktridiag_mul ckbs_sumsq_obj ckbs_L2L1_obj ckbs_sumsq_grad ckbs_process_grad ckbs_sumsq_hes ckbs_process_hes ckbs_tridiag_solve ckbs_tridiag_solve_b ckbs_tridiag_solve_pcg ckbs_newton_step ckbs_newton_step_L1 ckbs_kuhn_tucker ckbs_kuhn_tucker_L1 ckbs_diag_solve-> diag_solve_ok.m diag_solve_ok.m Headings-> Source Code

ckbs_diag_solve Example and Test

Source Code ``` function [ok] = diag_solve_ok() ok = true; m = 2; n = 3; N = 4; % case where uk = 0, qk = I, and ak is random rand('seed', 123); a = rand(n, n, N); r = rand(n * N, m); for k = 1 : N ak = a(:, :, k); b(:, :, k) = 2 * eye(n) + ak * ak'; end % ---------------------------------------- [e, lambda] = ckbs_diag_solve(b, r); % ---------------------------------------- check = ckbs_blkdiag_mul(b, e); ok = ok & max(max(abs(check - r))) < 1e-10; return end ```
Input File: example/diag_solve_ok.m