Can you please help me.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Jesus Flores
el 29 de Mzo. de 2021
Respondida: Mahesh Taparia
el 1 de Abr. de 2021
Write a function that takes a vector as input and returns the sum of every other value in the vector, starting with the first value. Name your function whatever you like
1 comentario
DGM
el 29 de Mzo. de 2021
That's not a question. Do you have a question about your attempts to implement such a function?
Hint: 1:2:length(vector)
Respuesta aceptada
Mahesh Taparia
el 1 de Abr. de 2021
Hi
To define a function, you can refer this documentation on function creation. To add all the vector elements, you can refer this example. Hope it will help!
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Get Started with MATLAB en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!