Problem 42783. Accessing values in a cell
You are given c, which is a 1xN cell array, and a and b, which are each two 1xM vectors. Your job is to give the bth value in the ath cell for the entire vectors a and b.
For example c{1}=2:6; c{2}=7:12; c{3}=13:18;
a=[1 2 3]; b=[4 5 6];
You would want to output [5 11 18], which are the values of c{1}(4), c{2}(5) and c{3}(6). You can assume that a and b are the same length, all of the values in c are numbers, and there will be no empty cells. Good luck!
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers46
Suggested Problems
-
Find the peak 3n+1 sequence value
2499 Solvers
-
Rotate input square matrix 90 degrees CCW without rot90
614 Solvers
-
How many monitors are connected ?
152 Solvers
-
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
378 Solvers
-
Compute LOG(1+X) in natural log
250 Solvers
More from this Author80
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!