Error " Array indices must be positive integers or logical values."
Ältere Kommentare anzeigen

This is the Question I am being asked to solve and this is the code I have so far...
T1 = 70; %deg F
T2 = 200; %deg F
W = 2; %ft
L = 2; %ft
x = 1; %ft
y = 1; %ft
for n=0:1.83:11
T(n)=(T2-T1)*(2/pi)*(2/n)*(sin(n*pi*x/L))*(sinh(n*pi*y/L))/sinh(n*pi*W/L)+T1;
end
I'm nor sure if my n for the for loop is correct since nmax is 11 and there needs to be six steps, but I keep getting an Error " Array indices must be positive integers or logical values."
Not sure how I can fix the Error.
1 Kommentar
Rik
am 29 Apr. 2020
As a side note: if your code is correct, then the only "correct and appropriate" use of a loop will be be this:
for dummy=1
T=%array operation that creates T
end
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!