Integral vector .* sin(pi*x) error matrix dimensions must agree.
Show older comments
I have the following code I try to find integral for function f the um is data vector (1X50). The problem is how can I used ingtral function to find integral for (vector .* sin(pi*x)), when I run code I received error "matrix dimensions must agree." any badoy can help me.
if true
L=1;
x = linspace(0, L, n);
fm=zeros(1,n);
for i=1:1
lam=i*pi;
f=@(x) um .* sin(lam * x ); % _um vector 1X50 double_
fm=fm+exp(lam^2*T)*sin(lam*x)*(2*integral(f,0,L));
end
end
Accepted Answer
More Answers (0)
Categories
Find more on Univariate Discrete Distributions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!