creating matrix using existing matrix
Show older comments
given a matrix, how do you apply a function on every element to create a new matrix of the same size ?
1 Comment
Wan Ji
on 15 Aug 2021
That's simple, e.g.
A = magic(5);
B = A.^2 + 3*A + 4;
Accepted Answer
More 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!