Mulitpling diffrent scalars to diffrent numbers in a matrix
1 view (last 30 days)
Show older comments
I am trying to multiply several different scalars to a random vector depending on the size of the number. For example, [1 6 3 17 30 7 10 4 25 27], I don't know if these numbers will be the ones chosen though. Each number would be multiplied by a different scalar depending on the size of the number. Anything under 10 would be multiplied by 5, anything between 11 and 26 would be multiplied by 12, and everything else is multiplied by 17. This would make the above vector [5 60 30 204 510 35 100 20 425 459].
0 Comments
See Also
Categories
Find more on Resizing and Reshaping 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!