简体   繁体   中英

Undefined function 'times' for input arguments of type 'cell'

I'm using matlab to plot this code which should plot Theta ( dimensionless temperature at different times(t) ), when I try to run it I get this error "Undefined function 'times' for input arguments of type 'cell'"

t=1:1:5;
alfa=(1.172.*(10.^(-2))); ......   
    % alfa for steel with 1% carbon = 1.172*10^-2 m^2/s%
L=1;
T={(alfa.*t)./(L.^2)}; % dimensionless time equation %
lambda1=0.3111; % @ biot =0.1 % 
A1=1.0161; % @ biot =0.1 %
theta={A1.*exp(-(lambda1.^2).*T)}; % dimensionless Temperature equation %
plot(t,theta,'.');

I'm still a beginner in matlab & programming in general.

For some reason you're using cell arrays at line 5 and 8 (the curly braces {} ). Just remove them and your code will plot...

Regards

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM