Problem 2799. Multiply Column
Given two input, one matrix and one scalar number
For example
A is a matrix given
A = [ 1 2 2 5 2 5 2 3 4 6 4 6 3 4 6 1 5 7 ]
and n=2. The columns of A divide two groups first
and second column multiply each other and then
third and forth column multiply, and so on.
The result will be
Result = [ 2 10 10 6 24 24 12 6 35 ]
When n=3, the columns of A divide three groups
first and second third column multiply each other,
and so on.
Result = [ 4 50 24 144 72 35]
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers50
Suggested Problems
-
Replace NaNs with the number that appears to its left in the row.
3033 Solvers
-
Get the length of a given vector
12304 Solvers
-
Cell Counting: How Many Draws?
2249 Solvers
-
124 Solvers
-
Determine if a row vector has NaN
130 Solvers
More from this Author21
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!