Skip to content

Instantly share code, notes, and snippets.

View kgourgou's full-sized avatar
🪢
Back to tinkering

Kosti kgourgou

🪢
Back to tinkering
View GitHub Profile
@kgourgou
kgourgou / spacemacs-cheshe.md
Last active November 16, 2017 11:07 — forked from robphoenix/spacemacs-cheshe.md
Spacemacs Cheat Sheet

Useful Spacemacs commands

  • SPC q q - quit
  • SPC w / - split window vertically
  • SPC w - - split window horizontally
  • SPC 1 - switch to window 1
  • SPC 2 - switch to window 2
  • SPC w d - delete current window
  • SPC TAB - switch to previous buffer
  • SPC b b - switch buffers
function F = funm_randomized(A,fun)
%FUNM_RANDOMIZED Evaluate general matrix function using
% randomized approximate diagonalization method of Davies (2007).
tol = 8*eps(A(1,1)); % Tolerance for single or double precision A.
E = randn(size(A));
[V,D] = eig(A + (tol*norm(A,'fro')/norm(E,'fro'))*E);
F = V*diag(fun(diag(D)))/V;