How to compare two vectors with their shapes and values? Using Matlab
How to compare two vectors with their shapes and values? Using Matlab
(OP)
Hi!
I want to correlate two vectors not only in their shape but also considering their values in matlab. The functions i've searched (like, corrcoef/corr/corr2...) give the R-value, but that just consider the shape of the curve that the vectors represent, and i want to know also how close their values are. Is there any function that consider these both criteria(shape and values)?
To explain better:
Consider three vectors with values of 'sin(x)', '2*sin(x)' and '4*sin(x)'.
Using 'corr2' to correlate 'sin(x)' with '2*sin(x)' or 'sin(x)' with '4*sin(x)', once the shapes of the three vectors are the same, it will always return the same values of 'r', i.e. the value 1. But what i need is a function or something like that, that tells me not only that '2*sin(x)' has the same (or close in the case of my vectors) shape of 'sin(x)' but also that it is closer to my values than the vector '4*sin(x)'.
Thank you so much in advance!
I want to correlate two vectors not only in their shape but also considering their values in matlab. The functions i've searched (like, corrcoef/corr/corr2...) give the R-value, but that just consider the shape of the curve that the vectors represent, and i want to know also how close their values are. Is there any function that consider these both criteria(shape and values)?
To explain better:
Consider three vectors with values of 'sin(x)', '2*sin(x)' and '4*sin(x)'.
Using 'corr2' to correlate 'sin(x)' with '2*sin(x)' or 'sin(x)' with '4*sin(x)', once the shapes of the three vectors are the same, it will always return the same values of 'r', i.e. the value 1. But what i need is a function or something like that, that tells me not only that '2*sin(x)' has the same (or close in the case of my vectors) shape of 'sin(x)' but also that it is closer to my values than the vector '4*sin(x)'.
Thank you so much in advance!
RE: How to compare two vectors with their shapes and values? Using Matlab
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers
Of course I can. I can do anything. I can do absolutely anything. I'm an expert!
There is a homework forum hosted by engineering.com: http://www.engineering.com/AskForum/aff/32.aspx