2014-11-08 8 views
0

나는 익명 함수를 플롯하기 위해 노력하고있어에서 익명 함수를 플롯 할 수 없습니다 그러나 그것은 나에게 오류가 있습니다 : 오류 메시지가 크기가 혼합 말했듯이은 matlab에

>> [email protected](t) (3*t)/(exp(1)-(8.*t))-2/t.^2; 
>> x=linspace(-3,1,50); 
>> plot(x, f(x)) 
Error using/
Matrix dimensions must agree. 

Error in @(t)(3*t)/(exp(1)-(8.*t))-2/t.^2 

답변

2

합니다. 완전히 기능을 벡터화 : 결과를

[email protected](t) (3*t)./(exp(1)-(8.*t))-2./t.^2; 
x=linspace(-3,1,50); 
plot(x, f(x)) 

을 그리고 여기에, 이것은 당신이? enter image description here

찾고있는 것입니다