Undefined function 'conv2' for input arguments of type 'sym'.
조회 수: 11 (최근 30일)
이전 댓글 표시
im trying to implement the function in the attached image but i get an error at the convolution step saying "Undefined function 'conv2' for input arguments of type 'sym'."

and my code as follows :
if true
clc;
close all;
M=8;
N=32;
K=14;
c=2;
p=1;
i=13;
s=1;
syms pfa1 i T
eqn = (symsum(nchoosek(M,i)*(pfa1)^(i)*(1-pfa1)^(M-i), i, s, M)==10^(-6));
solve(eqn,pfa1);
result=solve(eqn,pfa1);
result=double(result);
result=result( result<1 & result>0 & abs(imag(result))<2*eps );
e=result
f_t=p^(c/2).*(c/2)*t.^((c/2)-1).*exp(-(t/p).^(c/2))
F_t=1-exp(-(t/p).^(c/2));
fk_t=K*nchoosek(N/2,K).*(1-F_t).^(N/2-K).*(F_t).^(K-1).*f_t
Fk_t=symsum(nchoosek(N/2,i).*(1-F_t).^(N/2-i).*(F_t).^(i), i, K, N/2)
%fz_t=2.*fk_t.*Fk_t
fz_t=conv(fk_t,fk_t)
q=fz_t.* exp(-(T*t/p).^(c/2))
fun = @(t) q
o=integral(q,0 ,Inf)
%eqn=q==e;
%T=solve(eqn, T,'Real',true)
end
댓글 수: 0
채택된 답변
John D'Errico
2017년 6월 16일
But conv2 is not defined for symbolic input. It was not written for that purpose. Just wanting software to do what you want is rarely going to work. I suppose that is one reason why they have documentation. :)
A convolution is just an integral. You will need to write as such, although the desired integral may or may not have a symbolic solution.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Calculus에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!