[dummy index] = sort(A);
I want to ignore the first output of the sort function and just save the indexes. When I use the above, I get a warning in the matlab editor that:
The value assigned to the mannequin is not used.
and instead, ~ is suggested. When i use ~.
[~ index] = sort(A);
I got the following error:
use ~ to ignore a value in this context is not valid.
Does anyone have a solution for this?
You must add a comma and separate the output arguments to make ~ work.
Next works
[dummy index] = sort(A); [dummy, index] = sort(A); [~, index] = sort(A);
but
not executed.
It really works, although your question doesn't even show you using ~, where you say you get an error.
A = rand(1,5); [~,ind] = sort(A); ind ind = 3 5 1 2 4
Source: https://habr.com/ru/post/1439283/More articles:Google Chart Date Format - jsonHow to fill the medium in R - rHow to use deferLater in a for - twisted loopSMS verification - ruby-on-railsWhy does iPhone 5 briefly fill out Letterboxing and display Default.png in Cocos2d? - cocos2d-iphoneXcode Framework Resource Processing - iphonehttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1439285/writing-files-to-an-android-in-c&usg=ALkJrhhGDS8iW4Y0G-yTMX_Mhh0GqKgJSgWhy printf prints a random value using the float and integer format specifier - cHow to handle cross-cutting issues in an ASP.NET MVC 3 application? - c #How to Integrate JCaptcha into Spring Security - springAll Articles