Identify an equation that describes some chemical process, MATLAB Programming

Assignment Help:

1) Identify an equation that describes some chemical process.  Your equation should have at least two parameters, at least one of which should contribute in a non-linear way.

Here is an example of such an equation.  This describes the spectroscopic signal during a pH titration.

y = (A-B)*(10^(pH-pK) / (1 + 10^(pH-pK) )) + B

where

A: the signal from the protonated form

B: the signal from the ionized form

pK: The pK of the reaction

pH:The independent variable

y: The dependent variable (measured signal).

Y is linear in A and B, but non-linear with respect to pK

You can use this equation, but you will lose two points (out of 20) if you use it instead of some other equation

2) Implement a MatLab function to calculate y.  The function should take two input arguments

1) A vector of parameters

In the above example this would be of length 3, the first value being A, the second B ...

2) A vector of x (dependent variable) at which to calculate the function.

3) Implement a second MatLab function

1) It should  take three arguments (the first two the same as above, the third being an experimental y value.

2) It should call the first function to calculate a y, and return the norm of the difference between yCalc and yExp.

4) Create a text file with simulated data.

Calculate an experimental y using the first function and some reasonable values for the parameters

Add noise

Save the x values and calculated y values into a text file with the dlmwrite command.

2 extra bonus points if you also provide some actual experimental data that can be read in and is described by your equation!  You can obtain this from an actual research lab, on-line site, publication, textbook, ...

5) Create a GUI that has

A button to bring up a dialog to select a text file and read it in.

  1. Plot the x,y values on the GUI
  2. Have text entry values, one for each parameter, in which to enter guesses for the parameters.
  3. A button that calls the fminsearch command with appropriate arguments to do a non-linear fit to the data.
  4. Display the best fit values of the parameters
  5. Draw a calculated y vector on the graph.

Your functions should be well commented, indented (to highlight loops or if statements), and the variables should have consistent and meaningful names.

 Your project should be submitted as a zip file containing all the MATLAB files and any required data files. The zip file should be named Project2_YourInitials.zip.

There should be one function named "setupGUI" that should start the whole program and it should not require any arguments.


Related Discussions:- Identify an equation that describes some chemical process

Real time color recognition, Hello my name is lalitkumar and I am a student...

Hello my name is lalitkumar and I am a student.I needed help in MATLAB for recognition of colour randomly using webcam realtime for RGB without external trigger.please mail the co

Singal system , Q.1: Consider the transmission of a sinusoid x(t) = cos(2f...

Q.1: Consider the transmission of a sinusoid x(t) = cos(2f0t) through a channel a ected by multipath and Doppler. Let there be two paths, and assume the sinusoid is being sent fro

Plot function, The Plot Function: We will begin with a very simple gra...

The Plot Function: We will begin with a very simple graph of one point using the plot function. The script, plotonepoint, below plots only one point. To do this, at first the

Null basis and range basis, You will write functions • B=null basis(A,tol);...

You will write functions • B=null basis(A,tol); • B=range basis(A,tol); The function null basis takes a matrix A as input, and outputs a basis for the null space of A, obtained via

Program to find the minimum total cost for the fence, A fence enclosure con...

A fence enclosure consists of a rectangle of length L and width 2 R , and a semicircle of radius R , as shown in Figure 1. The enclosure is to be built to have an area of 1600 m

Develop matlab monte carlo queuing simulator, Answers should be submitted i...

Answers should be submitted in an MS Word document. Simulations should accompany answers in a separate MATLAB file. 1)  Queuing Simulator: Consider a communications router that

Illustration of for loop, illustration of for loop: illustration, to p...

illustration of for loop: illustration, to print a column of numbers from 1 to 5: for i = 1:5 fprintf('%d\n',i) end   This loop can be entered in the Command Wi

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd