How to divide a matrix by a number

Hi,
I have a function like:
r=[0.1:0.1:10];
E=1/(r^3);
How to get value E with correct command.
I try several but it is not correct.

 Accepted Answer

r=0.1:0.1:10;
E=1./(r.^3);
Best wishes
Torsten.

More Answers (0)

Asked:

ly
on 22 Jan 2016

Edited:

on 22 Jan 2016

Community Treasure Hunt

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

Start Hunting!