Hi Dear

I am wondering if anybody would know how to fit a set of data (x, y) with a

custom equation.

The equation is:

y=k*{2*(a-b)-(sin(2*a)-sin(2*b))}, where 'a' and 'b' is function of 'x' but

both 'a' and 'b' have separate boundary conditions. In effect, the angle 'a'

and 'b' has a phase difference.

'k' is a constant.

I really appreciate your reply. I would like to know if i could used some

other package.

regards

Faisal

# MATLAB Curve fitting-Custom Equation with 2 boundaries

Started by ●July 9, 2009

Posted by ●July 13, 2009

Hi Faisal,

I have done something similar using Mathematica, its very simple, try this

http://reference.wolfram.com/mathematica/ref/FindFit.html

Not sure in Matlab, maybe try fsolve !

Let me know if this helps.

Good luck,

Tilak

On 7/8/09, Faisal, Nadimul H wrote:

> Hi Dear

> I am wondering if anybody would know how to fit a set of data (x, y) with a

> custom equation.

> The equation is:

>

> y=k*{2*(a-b)-(sin(2*a)-sin(2*b))}, where 'a' and 'b' is function of 'x' but

> both 'a' and 'b' have separate boundary conditions. In effect, the angle 'a'

> and 'b' has a phase difference.

> 'k' is a constant.

>

> I really appreciate your reply. I would like to know if i could used some

> other package.

>

> regards

> Faisal

>

I have done something similar using Mathematica, its very simple, try this

http://reference.wolfram.com/mathematica/ref/FindFit.html

Not sure in Matlab, maybe try fsolve !

Let me know if this helps.

Good luck,

Tilak

On 7/8/09, Faisal, Nadimul H wrote:

> Hi Dear

> I am wondering if anybody would know how to fit a set of data (x, y) with a

> custom equation.

> The equation is:

>

> y=k*{2*(a-b)-(sin(2*a)-sin(2*b))}, where 'a' and 'b' is function of 'x' but

> both 'a' and 'b' have separate boundary conditions. In effect, the angle 'a'

> and 'b' has a phase difference.

> 'k' is a constant.

>

> I really appreciate your reply. I would like to know if i could used some

> other package.

>

> regards

> Faisal

>

Posted by ●July 17, 2009

Hi

I am trying to take log of an image data, it comes up with an error like

Function 'subsindex' is not defined for values of class 'struct'

I am not sure what actually this error is.

could you please someone advise me with reasons for error,

data = dataread('C:\Users\afn_006.nii');

data2=log(data)

thanks

hek

I am trying to take log of an image data, it comes up with an error like

Function 'subsindex' is not defined for values of class 'struct'

I am not sure what actually this error is.

could you please someone advise me with reasons for error,

data = dataread('C:\Users\afn_006.nii');

data2=log(data)

thanks

hek