Community Tip - You can change your system assigned username to something more personal in your community settings. X
Please, what would be the code that I should do, [~,~,CG(:,1)=unique(Y), the unique function was clear to me. I appreciate the answer, now the expression [~,~,CG(:,1)] It seems that it changes the ordered values from 1 onwards, it seems that all the similar values are changed by a number in repeated order as shown in the figure, in the figure there is also the value of ans, which is unique, and above the value of Y=[0,, 0, 0, 3.7, 3.7, 3.7, 7.4, 7.4, 7.4, 3.7, 7.4], using puts it in the first column as [1, 1, 1 ,2, 2, 2, 3 , 3, 3, 2,3], how would that programming be, in Mathcad prime
--------------------------------------------------------
Translated text from Spanish to English using google translate. Translated by vnamboodheri on 28-March-2023 at 8:51am IST
Porfavor cual seria el codigo que debo realizar, [~,~,CG(:,1)=unique(Y),la funcion unique me quedo claro agradezco la respuesta ahora la expresion [~,~,CG(:,1)] parece que cambia los valores ordenados desde 1 en adelante, parece que todo los valores smiliares los cambia por un numero en ordenrepetido tal como se muestra en la figura, en la figura tambien esta el valor de ans que es el unique y arriba el valor de Y=[0,, 0, 0, 3.7, 3.7, 3.7, 7.4, 7.4, 7.4, 3.7, 7.4], al usar lo pone en la primera columna como [1, 1, 1 ,2, 2, 2, 3, 3, 3, 2,3], como seria esa programacion, en mathcad prime
--------------------------------------------------------
Solved! Go to Solution.
Hi
Matlab "unique" function sorts the terms in increasing order.in the result. I have added a 5.4 out of order to show you.
In order to get this need to add some sorting in the Prime function:
Cheers
Terry
Hi
Matlab "unique" function sorts the terms in increasing order.in the result. I have added a 5.4 out of order to show you.
In order to get this need to add some sorting in the Prime function:
Cheers
Terry
Muchas gracias un excelente aporte muy buena comunidad se agradece