Clear Filters
Clear Filters

how can i make a 400x400 matrix to 400x1

3 views (last 30 days)
Joydeb Saha
Joydeb Saha on 7 Feb 2022
Answered: Matt J on 7 Feb 2022
how can i make a 400x400 matrix to 400x1? in matlab

Answers (1)

Matt J
Matt J on 7 Feb 2022
Many ways, e.g.,
sum(rand(400),2)
ans = 400×1
195.9990 187.9329 202.8237 202.9344 191.2276 202.7733 202.5645 197.4785 192.7097 201.8075

Categories

Find more on Operating on Diagonal 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!