looping with certain condition
5 views (last 30 days)
Show older comments
Hi, Supposed I have two matrices A and B. A = size 443823 x 1 and B = size 870 x1
Sample data of Matrix A = A =[1 1 1 (n of times)… 2 2 2(m of times) 3 3 3 (p of times) Until the end.
And sample data in Matrix B = B = [180 182 185 189 150 ..... Till the end].
From above matrix, I would like to assign value from B depends on A in new Matrix C, result as follow- c =[180 180 180 (n times) 182 182 (m times) 185 185 (p times) 189 189 189 189 (... times]
can any one help this.
tq. aqef
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Loops and Conditional Statements 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!