I have a set a data in a single column vector.
I would like to run each value through the equation that is attached as a screen shot.
In a function file I have created the following function:
function P = erf(A)
Ubg = 0.3991
Orpec = 0.4580
Obg = 0.3751
Osp = 0.2963
inter1 = Orpec^2 + Obg^2 + Osp^2
inter2 = 2*inter1
SRI2 = sqrt(inter2)
inter3 = A-Ubg
ABI3 = abs(inter3)
P = ABI3/SRI2
I then call the funciton in the command window and select my input array which is 'H' by:
The output array that is created does not have the values that I would expect.
Could anyone tell me where I am going wrong?
Sorry if this is a silly question im new to matlab and rusty on my maths!
Any help would be greatly appreciated!