denormalization of a data
3 views (last 30 days)
Show older comments
I had a matrix A=[2063 2003 1992 2004 2070 2246 2678 3083 3161 3160 3176 3130 3038 3047 29852930 3069 3228 3087 2929 2790 26022404 2205]; and I want to create a matrix B data range 150-300 that is like this that at the peak of A there will be minimum of B and at the min of A there will be peak of B in the same ratio select the other data reverse like this.
0 Comments
Answers (1)
Star Strider
on 29 Mar 2018
Try this:
A = [2063 2003 1992 2004 2070 2246 2678 3083 3161 3160 3176 3130 3038 3047 29852930 3069 3228 3087 2929 2790 26022404 2205];
[As,Ix] = sort(A);
B = linspace(300, 150, numel(A));
B(Ix) = B;
A = [ 2063 2003 1992 2004 2070 2246 2678 3083 3161 3160 3176 3130 3038 3047 29852930 3069 3228 3087 2929 2790 26022404 2205 ]
B = [ 279 293 300 286 271 257 250 207 179 186 171 193 229 221 150 214 164 200 236 243 157 264 ]
0 Comments
See Also
Categories
Find more on Database Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!