Info

This question is closed. Reopen it to edit or answer.

Eleminating, Finding,and changing the values

1 view (last 30 days)
ak42
ak42 on 4 Jul 2014
Closed: MATLAB Answer Bot on 20 Aug 2021
I try to solve the problem below with accumarray. And accumarray works for just integer.
I wıll write it more complex. Assume I have two group data, x(y') and z(y) points, and y' is member of y or in the range of y. Now the question how can find z(y)=z(y)- x(y') at y'=y.
For example
for group of calculated data
y'_1= 0.023 is x_1=3.127
y'_2= -0.043 is x_2=2.324
...
y'_i= 0.112 is x_i=1.3418
and
for given data
y_1=-0.047 is z_1=2.432
y_2=0.023 is z_2= 5.231
Y_3=0.05 is z_3=4.548
...
y_n=0.1 is z_n=3.21
i and n are dimension of data or range. I want to find or match y' values in y and then corresponding to y'=~y I want to do z=z-x
in other words if ı get y'_2 value, it is close to y_1 and then I rounded it to y_1(because y' is not match and it is not near y_2). Later I do
z_1-x_2=2.432-2.324=0.088 =z_1 corresponding to point y_1
now for
y_1=-0.047 is z_1=0.088
y_2=0.023 is z_2= 5.231
Y_3=0.05 is z_3=4.548
...
y_n=0.1 is z_n=3.21
  4 Comments
dpb
dpb on 7 Jul 2014
Edited: dpb on 7 Jul 2014
Still ambiguities --
a) (relatively minor point) what is the rule for selection for the repeated values in yw?
and the big hangup--
b) if plot y and z versus index, they're clearly some functional relationship of sorts w/ sequence, but both are multi-valued. Hence, how is one to choose which of multiple values in y is to be the one associated with yw?
Mayhaps if you can explain the end result/objective it would lead to some way to reapproach the problem; as posed I see no particular solution.
ak42
ak42 on 9 Jul 2014
In attached file, my aim is explained. I think it could be enough.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!