denormalization of a data
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Star Strider
il 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 Commenti
Vedere anche
Categorie
Scopri di più su Database Toolbox in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!