Auto Populating a Numeric Array
Show older comments
So I'm trying to do some multidimensional scaling for my research and I need an [n x n] matrix (or just an upper diagonal thereof, doesn't matter) of dissimilarity values to plug into the mdscale function. I've got a rank-order table of similarities like such: AB (where AB would be the comparison judged most similar) AC ... JK (where JK would be the comparison judged least similar)
and I've used the cell2mat function to convert each alpha value into its corresponding ASCII decimal value, and then subtracted repmat([64,64],55,1) to transform the whole table into numeric values from 1-11 as such: 1 2 (again, most similar) 1 3 ... 10 11 (least similar)
SO, now I need to find a way to plot the similarity rankings of these values into their appropriate locations on that n x n matrix. Like, here 1 would be plotted at the cell corresponding to A x B (or 1 x 2), 2 at the cell for A x C (or 1 x 3), etc. Does anyone here know how to do this thing? Obviously I could just go through the cards manually and plot their ranks into a matrix, but I'm hoping to do a lot of trials with this setup and we have a barcode scanner that can get the comparisons into a nice rank-order list in like 2 minutes vs the 20 it would take me to plot everything by hand, so it would be really really nice to just be able to write a program that can do this all really fast.
Answers (0)
Categories
Find more on Creating and Concatenating Matrices 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!