logplot_exec_yourlogin

logplot_exec_yourlogin -...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
function [] = logplot_exec_yourlogin(datafile) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Programmer(s) and Purdue Email Address(es): % 1. @purdue.edu % % Section #:ALL % % Assignment #: Homework 11 problem 4 - Log Plot of a Data Set % % Academic Integrity Statement: % % I/We have not used source code obtained from % any other unauthorized source, either modified % or unmodified. Neither have I/we provided access % to my/our code to another. The project I/we am/are % submitting is my/our own original work. % % logplot_exec_yourlogin - This function loads a data file, creates vectors % of the independent and dependent variables, and calls log_plots function. % % INPUT ARGUMENTS % datafile - name of the datafile % % OUTPUT ARGUMENTS % none % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Load the Data [data_in] = load(datafile); % Assign the independent and dependent variables ind_var = data_in(:,1); dep_var = data_in(:,2); % Call function to plot data using 4 scales
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: log_plots_yourlogin(ind_var,dep_var); % Dataset 1 fprintf('The general form of the equation for dataset 1 is: y = b x^m ') fprintf('because the data is linear in the log-log plot.\n') fprintf('The linearized form of the equation is log(y) = log(b) +m log(x)\n') fprintf('The slope is m = 0.3 and the intercept is b = 3.0 (to 4 decimals = 2.9985)') fprintf('The general form of the equation for dataset 1 is: y = 3 x^0.3 \n') fprintf('The linearized form of the equation is log(y) = log(3) +0.3 log(x)\n') % Dataset 2 fprintf('The general form of the equation for dataset 1 is: y = b 10^mx ') fprintf('because the data is linear in the semi-log y plot.') fprintf('The linearized form of the equation is log(y) = log(b) +m(x)\n') fprintf('The slope is m = 0.015 and the intercept is b = 0.25 ') fprintf('The general form of the equation for dataset 1 is: y = (0.25) 10^0.015x ') fprintf('The linearized form of the equation is log(y) = log(0.25) +0.015(x)\n')...
View Full Document

Page1 / 2

logplot_exec_yourlogin -...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online