Effacer les filtres
Effacer les filtres

Sort isn't properly sorting symbolic variables even though I am assuming them positive

5 vues (au cours des 30 derniers jours)
I have this vector "FrecuenciasCorregidas" with 2 values (both depend on "k" and "m"):
I want it to be sorted, so the lower one (3k/20m) goes first and the higher one (k/3m) goes second. So I assume k and m positive and sort:
assume([m,k],'positive');
FrecuenciasCorregidas=sort(FrecuenciasCorregidas,'ascend')
assume([m,k],'clear');
However, I am still getting the same vector:
Any idea what am I doing wrong? Thanks
  3 commentaires
El Vapor
El Vapor le 27 Juin 2020
But I am assuming k and m positive, so it should just treat them like numbers, forgetting about the symbolic thing

Connectez-vous pour commenter.

Réponses (1)

Pablo García Fogeda Núñez
Te he pillado mamón.

Catégories

En savoir plus sur Shifting and Sorting Matrices dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by