Skip to content

Instantly share code, notes, and snippets.

x=[1:1006];
w=1.2;
x=sin(w.*x);
q(1)=0;
q(2)=0;
for i=3:1005,
q(i)=1.5*q(i-1)-0.7*q(i-2)+x(i-1)+0.5*x(i-2)+randn(1,1);
end
for i=1:1000,
q(i)=q(i+2);
@aligo
aligo / playground.rs
Created August 16, 2019 10:39 — forked from rust-play/playground.rs
Code shared from the Rust Playground
macro_rules! iflet {
([$p:pat = $e:expr] $($rest:tt)*) => {
if let $p = $e {
iflet!($($rest)*);
}
};
($b:block) => {
$b
};
}