필터 지우기
필터 지우기

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

조회 수: 5 (최근 30일)
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
El Vapor
El Vapor 2020년 6월 27일
But I am assuming k and m positive, so it should just treat them like numbers, forgetting about the symbolic thing

댓글을 달려면 로그인하십시오.

답변 (1개)

Pablo García Fogeda Núñez
Pablo García Fogeda Núñez 2020년 7월 3일
Te he pillado mamón.

카테고리

Help CenterFile Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by