Vai al contenuto
MathWorks

Cody

  • Centro assistenza
  • Problemi in Cody
  • MathWorks
  • MATLAB Help Center
  • Community
  • Apprendimento
  • Acquista MATLAB MATLAB
  • Accedi
    • Il Mio Account
    • Il mio Profilo utente
    • Associa Licenza

    • Disconnettiti
  • Contatta l’assistenza MathWorks
  • Visit mathworks.com
  • MATLAB Answers
  • File Exchange
  • Cody
  • AI Chat Playground
  • Discussions
  • Contests
  • Blogs
  • More
    • Communities
    • Treasure Hunt
    • People
    • Community Advisors
    • Virtual Badges
    • About
  • Home
  • Problem Groups
  • Problems
  • Players
  • More
    • Solutions
    • Recent Activity
  • Help

Problem 44888. Given a matrix A (size m x n) create a matrix B which consists of matrix A sorted in descending order by columns and then by rows.

Yoav Shallev
Yoav Shallev
146 solvers
1 likes
Solve
Solve Later

 ---------------
A=
[ 2 6 -3
7 12 0
-12 5 1]
---------------
B=
    [12     7     1
     6     2     0
     5    -3   -12];
Solve

Solution Stats

537 Solutions

146 Solvers

Last Solution submitted on Apr 02, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers146

Pauli Huusari Riccardo G. CXD Lorenzo

Suggested Problems

  • Select every other element of a vector

    36597 Solvers

  • Project Euler: Problem 10, Sum of Primes

    2103 Solvers

  • Magic is simple (for beginners)

    11393 Solvers

  • 03 - Matrix Variables 4

    644 Solvers

  • Back to basics - mean of corner elements of a matrix

    463 Solvers

More from this Author4

  • Rearrange the given matrix to have all its zeros climb up to the top of each column - using for loops.

    137 Solvers

  • Given a Vector v1, create v2 which is the sum of each two adjacent elements in v1. {length(v2)=length(v1)-1}

    162 Solvers

  • Given a matrix A (size m x n) create a matrix B (size m+2 x n+2) which consists of matrix A surrounded by zeros. See Example below:

    156 Solvers

  • Given a matrix A return a vector of the product of the elements in each column using a loop without using prod.

    152 Solvers

Problem Tags

  • basic matlab
  • matrix

Community Treasure Hunt

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

Start Hunting!
MathWorksMathWorks

Seleziona un sito web

Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .

  • (English)
  • (Deutsch)
  • (Français)
  • (简体中文)
  • (English)

Puoi anche selezionare un sito web dal seguente elenco:

Come ottenere le migliori prestazioni del sito

Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.

Americhe

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europa

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia-Pacifico

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
    • 简体中文
    • English
  • 日本 (日本語)
  • 한국 (한국어)

Contatta l’ufficio locale

  • Centro di fiducia
  • Marchi
  • Informativa sulla privacy
  • Antipirateria
  • Stato dell'applicazione
  • Condizioni d'uso
  • Contact Us

© 1994-2026 The MathWorks, Inc.