This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # After watching the excellent YouTube lecture: | |
| # "Compressive Sensing" — https://youtu.be/rt5mMEmZHfs?si=gEvXWluUf3dBwT2Q | |
| # Which I found in refernces from even more awesom video: | |
| # "X-ray backscatter with compressed sensing algorithm" | |
| # https://www.youtube.com/watch?v=EuVgGrun1V0 (time to start building The Thing!-) | |
| # | |
| # Below is an R translation of the lecture’s MATLAB code. | |
| # Original MATLAB line #1: clear all; close all; clc | |
| # Equivalents of: clear all; close all; clc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int aprintf(char *str, ...) { | |
| int i, j, count = 0; | |
| va_list argv; | |
| va_start(argv, str); | |
| for(i = 0, j = 0; str[i] != '\0'; i++) { | |
| if (str[i] == '%') { | |
| count++; | |
| Serial.write(reinterpret_cast<const uint8_t*>(str+j), i-j); |