This file contains 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
clc; | |
clear; | |
close all; | |
% Given sequence | |
X = [1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0]; | |
N = length(X); % Length of sequence (must be power of 2) | |
% Bit-reversal permutation | |
bit_rev_order = bitrevorder(0:N-1) + 1; |
This file contains 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
#!/usr/bin/env bash | |
# File to store previously printed commands | |
printed_commands_file=~/.local/share/daily-whatis/databases/printed_commands_db.txt | |
# Check if the file exists, if not create it | |
if [ ! -f "$printed_commands_file" ]; then | |
mkdir -p "$(dirname "$printed_commands_file")" # Ensure directory exists | |
touch "$printed_commands_file" # Create the file | |
fi |