Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Calculating the absolute error

Subject: Calculating the absolute error

From: Sanaa

Date: 31 Jul, 2013 15:28:14

Message: 1 of 6

Hi all
I have tow types of equations, the first is 3 fractional-order differential equations and the second is a 3 difference equations. I got the solutions for both of them; x, y and z
How to calculate the absolute error between the solutions in Matlab?
Thanks for any help.

Subject: Calculating the absolute error

From: someone

Date: 31 Jul, 2013 20:24:15

Message: 2 of 6

"Sanaa" wrote in message <ktbaee$gs$1@newscl01ah.mathworks.com>...
> Hi all
> I have tow types of equations, the first is 3 fractional-order differential equations and the second is a 3 difference equations. I got the solutions for both of them; x, y and z
> How to calculate the absolute error between the solutions in Matlab?
> Thanks for any help.

Without any further information, I can only offer the following:

<<https://en.wikipedia.org/wiki/Approximation_error>>

Subject: Calculating the absolute error

From: Sanaa

Date: 31 Jul, 2013 20:39:10

Message: 3 of 6

"someone" wrote in message <ktbrpe$k9q$1@newscl01ah.mathworks.com>...
> "Sanaa" wrote in message <ktbaee$gs$1@newscl01ah.mathworks.com>...
> > Hi all
> > I have tow types of equations, the first is 3 fractional-order differential equations and the second is a 3 difference equations. I got the solutions for both of them; x, y and z
> > How to calculate the absolute error between the solutions in Matlab?
> > Thanks for any help.
>
> Without any further information, I can only offer the following:
>
> <<https://en.wikipedia.org/wiki/Approximation_error>>
Thank you very much for your suggestion, however, it was not the thing I asked for. I know the definition but I am confused because of the formula I should use.
I have x, y, and z.
Do u know the formula? or there is a ready-made code in Matlab?

Subject: Calculating the absolute error

From: Alan

Date: 31 Jul, 2013 21:13:11

Message: 4 of 6

"Sanaa" wrote in message <ktbsle$mmn$1@newscl01ah.mathworks.com>...
> "someone" wrote in message <ktbrpe$k9q$1@newscl01ah.mathworks.com>...
> > "Sanaa" wrote in message <ktbaee$gs$1@newscl01ah.mathworks.com>...
> > > Hi all
> > > I have tow types of equations, the first is 3 fractional-order differential equations and the second is a 3 difference equations. I got the solutions for both of them; x, y and z
> > > How to calculate the absolute error between the solutions in Matlab?
> > > Thanks for any help.
> >
> > Without any further information, I can only offer the following:
> >
> > <<https://en.wikipedia.org/wiki/Approximation_error>>
> Thank you very much for your suggestion, however, it was not the thing I asked for. I know the definition but I am confused because of the formula I should use.
> I have x, y, and z.
> Do u know the formula? or there is a ready-made code in Matlab?

I think i might be misunderstanding the question, but can you do an element by element calculation of the absolute error? I'm assuming you have all the values you need but just don't have a formula?

could you write a short pseudocode or description of how you would do it outside of matlab? that would help in determining if there's a built-in function to use

Subject: Calculating the absolute error

From: dpb

Date: 31 Jul, 2013 21:26:27

Message: 5 of 6

On 7/31/2013 3:39 PM, Sanaa wrote:
> "someone" wrote in message <ktbrpe$k9q$1@newscl01ah.mathworks.com>...
>> "Sanaa" wrote in message <ktbaee$gs$1@newscl01ah.mathworks.com>...
>> > Hi all
>> > I have tow types of equations, the first is 3 fractional-order
>> differential equations and the second is a 3 difference equations. I
>> got the solutions for both of them; x, y and z
>> > How to calculate the absolute error between the solutions in Matlab?
>> > Thanks for any help.
>>
>> Without any further information, I can only offer the following:
>>
>> <<https://en.wikipedia.org/wiki/Approximation_error>>
> Thank you very much for your suggestion, however, it was not the thing I
> asked for. I know the definition but I am confused because of the
> formula I should use.
> I have x, y, and z.
> Do u know the formula? or there is a ready-made code in Matlab?

Are the solution spaces commensurate in dimensions? If so, simply
subtract one from the other and abs() it.

If owing to how you solved them they're not, you'll have to convert them
both to a common basis via interpolation of some sort to do the difference.

--

Subject: Calculating the absolute error

From: Sanaa

Date: 1 Aug, 2013 08:55:10

Message: 6 of 6

dpb <none@non.net> wrote in message <ktbveb$h2m$1@speranza.aioe.org>...
> On 7/31/2013 3:39 PM, Sanaa wrote:
> > "someone" wrote in message <ktbrpe$k9q$1@newscl01ah.mathworks.com>...
> >> "Sanaa" wrote in message <ktbaee$gs$1@newscl01ah.mathworks.com>...
> >> > Hi all
> >> > I have tow types of equations, the first is 3 fractional-order
> >> differential equations and the second is a 3 difference equations. I
> >> got the solutions for both of them; x, y and z
> >> > How to calculate the absolute error between the solutions in Matlab?
> >> > Thanks for any help.
> >>
> >> Without any further information, I can only offer the following:
> >>
> >> <<https://en.wikipedia.org/wiki/Approximation_error>>
> > Thank you very much for your suggestion, however, it was not the thing I
> > asked for. I know the definition but I am confused because of the
> > formula I should use.
> > I have x, y, and z.
> > Do u know the formula? or there is a ready-made code in Matlab?
>
> Are the solution spaces commensurate in dimensions? If so, simply
> subtract one from the other and abs() it.
>
> If owing to how you solved them they're not, you'll have to convert them
> both to a common basis via interpolation of some sort to do the difference.
>
> --
Thanks for replying. Do you mean
error=abs(x_e-x_a)+(y_e-y_a)+(z_e-z_a)?
where x_e=exact solution, x_a=approximated solution?

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us