Undefined operator './' for input arguments of type 'function_handle'.
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
guest10011
am 31 Okt. 2018
Kommentiert: Walter Roberson
am 1 Nov. 2018
Hello,
The part of the code I developed is exhibited below:
deriv1 = @(x) (sum(log(ti(x))-log(x(2))-(x(3)./Ti)-(x(4)./Vi)-log(tj(x)./(log(x(2))+(x(3)./Tj)+(x(4)./Vj))).*(tj./(log(x(2))+(x(3)./Tj)+x(4)./Vj)).^x(1))+sum(- log(ti(x)./(log(x(2))+x(3)./Vi + x(4)./Vi)).*(ti(x)./(log(x(2))+ x(3)./Vi + x(4)./Vi)).^x(1) + 1./x(1)));
% Derivative dL/dA
%deriv2 = @(x) -(x(1).*(sum((Vj.^x(3).*tj(x).*x(2)).^x(1))+sum((Vi.^x(3).*ti(x).*x(2)).^x(1))-1))./x(2);
deriv2 = @(x) (sum((x(1).*tj(x).*(tj(x)./(log(x(2)) + x(3)./Tj + x(4)./Vj)).^(x(1) - 1))./(x(2).*(log(x(2)) + x(3)./Tj + x(4)./Vj).^2) - x(1)./x(2)) + sum((x(1).*ti(x).*(ti(x)./(log(x(2)) + x(3)./Vi + x(4)./Vi)).^(x(1) - 1))./(x(2).*(log(x(2)) + x(3)./Vi + x(4)./Vi).^2)));
% Derivative dL/dx(3)
deriv3 = @(x) (sum((x(1).*tj(x).*(tj(x)./(log(x(2)) + x(3)./Tj + x(4)./Vj)).^(x(1) - 1))./(Tj.*(log(x(2)) + x(3)./Tj + x(4)./Vj).^2)) + sum (- x(1)./Ti + (x(1).*ti(x).*(ti(x)./(log(x(2)) + x(3)./Vi + b./Vi)).^(x(1) - 1))./(Vi*(log(x(2)) + x(3)./Vi + x(4)./Vi).^2)));
% Derivative dL/b
deriv4 = @(x) (sum((x(1).*tj(x).*(tj(x)./(log(x(2)) + x(3)./Tj + x(4)./Vj)).^(x(1) - 1))./(Vj.*(log(x(2)) + x(3)./Tj + x(4)./Vj).^2)) + sum( - x(1)./Vi + (x(1).*ti(x).*(ti(x)./(log(x(2)) + x(3)./Vi + x(4)./Vi)).^(x(1) - 1))./(Vi.*(log(x(2)) + x(3)./Vi + x(4)./Vi).^2)));
I keep receiving the error message:
Undefined operator './' for input arguments of type 'function_handle'.
Error in
Example>@(x)(sum(log(ti(x))-log(x(2))-(x(3)./Ti)-(x(4)./Vi)-log(tj(x)./(log(x(2))+(x(3)./Tj)+(x(4)./Vj))).*(tj./(log(x(2))+(x(3)./Tj)+x(4)./Vj)).^x(1))+sum(-log(ti(x)./(log(x(2))+x(3)./Vi+x(4)./Vi)).*(ti(x)./(log(x(2))+x(3)./Vi+x(4)./Vi)).^x(1)+1./x(1)))
I was wondering where I was making the mistake. I have checked this part several times. Any help will be appreciated.
3 Kommentare
Walter Roberson
am 31 Okt. 2018
My guess is that Ti is a function handle and that where you refer to Ti you should have Ti(x)
Akzeptierte Antwort
Walter Roberson
am 1 Nov. 2018
(tj./(log(x(2))+(x(3)./Tj)+x(4)./Vj))
Has function handle tj divided by something
3 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Stress and Strain finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!