Borrar filtros
Borrar filtros

Am I doing something wrong in cody submission?

1 visualización (últimos 30 días)
ANKUR KUMAR
ANKUR KUMAR el 5 de Oct. de 2018
Comentada: ANKUR KUMAR el 5 de Oct. de 2018
I have solved couple of question on cody and cross checked my prog on matlab which showing exactly the same output which the question in cody needs. But everytime, its showing error in submission. I have attached the sample submission problem.

Respuesta aceptada

Stephen23
Stephen23 el 5 de Oct. de 2018
Editada: Stephen23 el 5 de Oct. de 2018
Your function returns y, which is just the index from sort and has nothing to do with the first column of x.
The code x([y],1) is not allocated to anything, so it will be discarded.
Note that the square brackets around y are totally superfluous:
  3 comentarios
Stephen23
Stephen23 el 5 de Oct. de 2018
Editada: Stephen23 el 5 de Oct. de 2018
Remove the conjugate transpose and the superfluous square brackets.
ANKUR KUMAR
ANKUR KUMAR el 5 de Oct. de 2018
Thank you. Still doing silly mistakes.. at learning stage.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by