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
%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 |
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
% Plotting a Circle through three random points | |
% | |
% __________________________ | |
% 3 random points ---> | calculate circle formula | -----> plot circle | |
% |__________________________| | |
% | |
% | |
clear | |
clc | |
% |
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
% Basic Tay Payable Calculator for 2011 | |
% | |
% ___________________________ | |
% input income ---> |calc tax, medicare and lio | -----> output tax | |
% |___________________________| | |
% | |
% | |
clear | |
clc | |
% |
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
% Calculate Compound or simple interest | |
% | |
% _____________________ | |
% input data and ---> | calculate interest | -----> output interst | |
% type of interest |_____________________| | |
% | |
% | |
clear | |
clc | |
%simple interest |
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
% Calculate Series and Parallel Resistances of two resistors | |
% | |
% ___________________ | |
% enter ohms ---> | calculate total | -----> display total ohmage | |
% |___________________| | |
% | |
% Series Resistors | |
% Totalresistance = R1 + r2 | |
% | |
% Parallel Resistors |