Getting an indexing error in my matlab program. Please help.

for i=0:8
for j=0:27
N_matrix(i)(j)=0;(ERROR HERE)
end
end
()-indexing must appear last in an index expression.

 Akzeptierte Antwort

KSSV
KSSV am 15 Okt. 2018
for i=1:8
for j=1:27
N_matrix(i,j)=0;(ERROR HERE)
end
end

6 Kommentare

Thanks again KSSV. You are brilliant man.
@ Virajan Verma you can become brilliant...just read some introductory tutorials in MATLAB.
Sure. Should i change the loop from 1 to 8 and 1 to 27??
It seems you have a fortran/ C code and you are converting it to MATLAB. is it?
Yes. I have a C code.
YOu ay find it useful :<https://in.mathworks.com/matlabcentral/answers/91303-how-to-convert-a-code-from-c-language-to-matlab>

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Startup and Shutdown finden Sie in Hilfe-Center und File Exchange

Tags

Gefragt:

am 15 Okt. 2018

Kommentiert:

am 15 Okt. 2018

Community Treasure Hunt

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

Start Hunting!

Translated by