what is the mistake in this code because the output results doesn't appear?

1 visualizzazione (ultimi 30 giorni)
how can I make one raw zeros function, I wrote zeros(1,n) but there is an error appeared

Risposte (1)

Angelo Yeo
Angelo Yeo il 4 Ott 2022
Modificato: Angelo Yeo il 4 Ott 2022
In line 180, you are not supposed to use function "zeros" like below.
zeros(j, 1:n)
According to the error message, the second input to "zeros" should be scalar not a vector like "1:n"
  2 Commenti
Angelo Yeo
Angelo Yeo il 4 Ott 2022
Modificato: Angelo Yeo il 4 Ott 2022
Thanks Walter for the comment. I changed my answer to be more specific.

Accedi per commentare.

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by