Values on plot do not match manually inputted values for an anonymous function.

This is the equation I am using. The two unknown variables are "t" and "T". My code is:
clear all;
clc;
syms T Tsur Ti r A V rho c SB Se t;
Tsur = 300; % Kelvin, temp of chamber
Ti = 800; % Kelvin, initial temp of ball
r = 0.006; % Meters, radius of ball
A = 4*pi*r^2; % Meters^2, surface area of ball
V = (4/3)*pi*r^3; % Meters^3, volume of ball
rho = 8000; % kg/m^3, density of ball
c = 480; % J/kg-K, specific heat of ball
SB = 5.6700e-08; % W/m^2-K^4, Stefan-Boltzmann constant
Se = 0.1; % Surface emmisivity
e = 1e-8;
m = 10000;
t = @(T) ((rho*V*c)/(4*Se*A*SB*(Tsur^3)))*((log(abs((Tsur+T)/(Tsur-T))) - (log(abs((Tsur+Ti)/(Tsur-Ti)))) + 2*(atan(T/Tsur)-atan(Ti/Tsur))));
T = 400:800;
plot(T,t(T))
When I type t(800) in the command window, I get 0. When I plot it, I get a different answer.

 채택된 답변

Matt J
Matt J 2023년 10월 4일
편집: Matt J 2023년 10월 4일
Your defintiion of t is not using element-wise ./ and .* operators.

추가 답변 (0개)

카테고리

제품

릴리스

R2022a

태그

질문:

2023년 10월 4일

댓글:

2023년 10월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by