Undefined function or variable

1 Ansicht (letzte 30 Tage)
michela elia
michela elia am 28 Nov. 2020
Kommentiert: michela elia am 28 Nov. 2020
Hi, I was running a matlab script where I need to import a file and then make some computations. The problem is that when I import the first file, everything works properly, but when I import another file of the same format but with other values, I got the error messagge "undefined function or variable". Really, I don't why, because I haven't changed anything except the imported data.
  2 Kommentare
Ameer Hamza
Ameer Hamza am 28 Nov. 2020
Can you give an example of a code that causes such an error?
michela elia
michela elia am 28 Nov. 2020
for i=loc1(1,1):1:loc(1,1)
if(O1P(1,i)>=(v(j)*pk(1,1)+pk1(1,1)))
a=i;
break
end
end
for i=loc(1,1):1:loc1(1,2)
if(O1P(1,i)<=(v(j)*pk(1,1)+ pk1(1,1)))
b=i;
break
end
end
the error is related to the variable b

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

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

Produkte


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by