I'm taking errors
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/547328/image.png)
hi everyone, this one is what ı have to the write. I'm writing like this
function read(n);
s=0;
for i=1:n
s=s+i
end
write(s)
but ım taking an error for ''for i=1:n'' side. How can ı solve it? please helppp
0 comentarios
Respuestas (1)
Jan
el 12 de Mzo. de 2021
Editada: Jan
el 12 de Mzo. de 2021
Please care for posting the compelete error message instead of mentioning only, that there is one.
How do you start this function? Using the green triangle? Then you do not provide any input and n is undefined. A function defined by
function read(n)
must be called e.g. as "read(5)"
The next problem will occur then: what is "write()"?
0 comentarios
Ver también
Categorías
Más información sobre Partial Differential Equation Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!