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
tic | |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
% -+= Welcome =+- | |
% This script was created by Ori Hauptman from Israel. | |
% | |
% Because of the way Matlab Apps are saved, it's hard and sometimes | |
% even not possible to resolve conflicts with Git. | |
% | |
% Run this script every time before commiting your changes to Git | |
% to create a folder for each of your apps, so you can reslove |
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
public class TwoNumbersCompression { | |
public static void main(String[] args) { | |
double compressed = compress(-5.57,8); | |
System.out.println("Compressed: " + compressed); | |
double[] decompressed = decompress(compressed); | |
System.out.println("Decompressed: " + decompressed[0] + ", " + decompressed[1]); | |
} | |
// Convert to between 0 and 1 | |
public static double convert(double a) { |