1 view (last 30 days)

Hey all,

How can you develop a 3 x 3 matrix with elements ranging from 1 to 9. Then perform the calculation that Add 40 to it, divide element-wise by 7, subtract 2 from it, take the square root of the result then take the exponential of that. Do all thismath in one line of code.

KSSV
on 15 Sep 2020

Read about exp, sqrt. If A is my matrix, to get exp of sqrt, I will use.

iwant = exp(sqrt(A)) ;

Opportunities for recent engineering grads.

Apply TodayFind the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
## 6 Comments

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/593740-how-do-you-do-matrix-math#comment_1009189

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/593740-how-do-you-do-matrix-math#comment_1009189

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/593740-how-do-you-do-matrix-math#comment_1009195

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/593740-how-do-you-do-matrix-math#comment_1009195

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/593740-how-do-you-do-matrix-math#comment_1009201

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/593740-how-do-you-do-matrix-math#comment_1009201

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/593740-how-do-you-do-matrix-math#comment_1009246

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/593740-how-do-you-do-matrix-math#comment_1009246

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/593740-how-do-you-do-matrix-math#comment_1009273

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/593740-how-do-you-do-matrix-math#comment_1009273

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/593740-how-do-you-do-matrix-math#comment_1009276

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/593740-how-do-you-do-matrix-math#comment_1009276

Sign in to comment.