Skip to content

Instantly share code, notes, and snippets.

View jc245410's full-sized avatar

Doug jc245410

View GitHub Profile
@jc245410
jc245410 / final_plot3circles.m
Created May 19, 2012 13:33
Plotting a Circle through three points. (Final version at top and early progression versions progressing down.
%PLOTTING A CIRCLE THROUGH 3 RANDOM POINTS OR USER INPUT POINTS
%Makes random array for random 3 points
randompoints = randi(10,2,3);
%loop to check whether all 3 points line up, if they do it re-generates the
%points.
while ((randompoints(2,2))-(randompoints(2,1)))/((randompoints(1,2))-(randompoints(1,1)))== ((randompoints(2,3)-randompoints(2,2))/((randompoints(1,3))-randompoints(1,2)))
randompoints = randi(10,2,3);
end
@jc245410
jc245410 / circle3points
Created April 25, 2012 08:33
Plotting a Circle through three points.
% Plotting a Circle through three random points
%
% __________________________
% 3 random points ---> | calculate circle formula | -----> plot circle
% |__________________________|
%
%
clear
clc
%
@jc245410
jc245410 / taxcalculator
Created April 18, 2012 10:50
A tax calculator which calculates tax depending on income for the year ending 30 June 2011.
% Basic Tay Payable Calculator for 2011
%
% ___________________________
% input income ---> |calc tax, medicare and lio | -----> output tax
% |___________________________|
%
%
clear
clc
%
@jc245410
jc245410 / interestcalc
Created April 17, 2012 04:18
Simple or Compound interest calculator
% Calculate Compound or simple interest
%
% _____________________
% input data and ---> | calculate interest | -----> output interst
% type of interest |_____________________|
%
%
clear
clc
%simple interest
@jc245410
jc245410 / resistcalc
Created April 17, 2012 04:15
Total Resistance Calculator
% Calculate Series and Parallel Resistances of two resistors
%
% ___________________
% enter ohms ---> | calculate total | -----> display total ohmage
% |___________________|
%
% Series Resistors
% Totalresistance = R1 + r2
%
% Parallel Resistors