Error using / matrix dimensions must agree
1 view (last 30 days)
Show older comments
Hi everybody, I am very new to matlab. And trying to write a code for my class project. Thus, I can not find where the problem is. As I stated, I am very new and the mistake might be very stupid or very big but it shouldn't take that long. I need to compute time as a function of t00 and plot them with respect to t00 values.
function [ evapt ] = tevap( t00 )
t00=400:10:1200;
evapt=zeros(1, length(t00));
lamcp=0.2*(10^-4);
cp=1.5;
d0=6*(10^-5);
dtc=1800;
tb=473;
rhol=800;
dhv=2200;
B=(cp*(dtc+t00-tb))/dhv;
beta=(8*lamcp*B)/(rhol*cp);
for i=length(t00)
evapt(i)=(d0^2)/beta;
end
end
0 Comments
Answers (1)
Walter Roberson
on 29 Jan 2016
for i = 1 : length(t00)
evapt(i)=(d0^2)./beta(i);
end
Or better, no loop and
evapt = (d0^2)./beta;
0 Comments
See Also
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!