Replace the first row of a matrix with the Square Root of each value

1 view (last 30 days)
H = [9 16 4; 1 3 5]
"In one line of code, take the square root of the first row of H and replace the current values in the first row of H with the result. Display the command entered into the command window."

Accepted Answer

Steven
Steven on 19 Mar 2013
H(1,:)=sqrt(H(1,:))

More Answers (1)

amal mohammd
amal mohammd on 10 Oct 2017
Replace the square root with the tangent, so that the tangents of the numbers 0, 1, 4, 9... 144 are printed and so the decimal points are aligned.

Categories

Find more on Data Types 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!