Output as an vector
Mostrar comentarios más antiguos
Heya,
For my class i have to Create a Algorithm to Approximate something and calculate the relative error but i can't seem to find the right way to Output it.
so we're given something like this (Wich we have to use exactly like this) "[Approximation,RelativeError] = Algorithm(x,n)". we must output it in a 1x2 vector, but everytime i call the function, only the Approximation is in the "ans". i know, that i can force it to give me both outputs, by inputting "[Approximation,RelativeError] = Algorithm(x,n)" (Wich i don't think the MatLab Grader we're using is doing) or just creating a Vector like A = [approximation,RelativeError] but the Grader won't check in the Vector A.
is there a way to Output that Function in a Vector by just Inputting "Algorithm(x,n) ?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!