Problem with answer 15.2 Creating and Calling Functions: (4/6) Create and Call a Function, task 1 MATLAB Fundamentals
Mostrar comentarios más antiguos
The problem asks us to modify the function call using two inputs. I put the answer as follows:
top5 = getLargestN(x,5)
i get a message 'error using exercise>getLargestN too many input arguments'.
The answer i solution is identical to one I gave. How do I move forward here?
Respuesta aceptada
Más respuestas (5)
Sanket
el 4 de Nov. de 2022
5 votos
y0 = 0.4;
yline(y0)
tzerox = findcrossing(t,x-y0)
tzeroy = findcrossing(t,y-y0)
Bhavesh Pawar
el 11 de Mzo. de 2022
y0 = 0.4;
yline(y0)
tzerox = findcrossing(t,x,y0)
tzeroy = findcrossing(t,y,y0)
5 comentarios
Oguz Tan
el 3 de Abr. de 2022
The real solution is different than the solution which the course gives.
y0 = 0.4;
yline(y0)
tzerox = findcrossing(t,x-y0)
tzeroy = findcrossing(t,y-y0)
Jorge Luis Argel Pacheco
el 22 de Oct. de 2022
gracias
Jorge Luis Argel Pacheco
el 22 de Oct. de 2022
esa tampoco es
Enes Çelik
el 1 de Dic. de 2022
Thank you so much Oguz!
Lester
el 9 de Oct. de 2023
Thank you, the code helped me.!
Mohamed Housni
el 10 de Jun. de 2024
y0 = 0.4;
yline(y0)
tzerox = findcrossing(t,x-y0)
tzeroy = findcrossing(t,y-y0)
1 comentario
Sequia
el 1 de Nov. de 2024
this one worked! thank you!
Joed Blair Jacalan
el 12 de Ag. de 2023
0 votos
- Modify the definition of the findcrossing function so that it takes a third input z.
- Add a new line to the beginning of the function:y = y - z;
- In the Task 1 section of the script, change the value of y0 to 0.4.
- Modify the two calls to findcrossing to add y0 as an input.
You can use the graph to check that the returned values of t are correct (x(t) = 0.4 and y(t) = 0.4)
Midhunprabu
el 26 de Dic. de 2024
0 votos
Then modify the command for Task 1 so that r has a value of 0.5.
Categorías
Más información sobre MATLAB en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!