I keep getting two answers for my code
Show older comments
I get my named output fconvg=" " but then I also get ans = " "
I don't understand where the ans = is coming from as I have all the semi colons needed?
function [ fconvg ] = AHMconvolve( f, g )
%UNTITLED2 Summary of this function goes here
% Detailed explanation goes here
syms x t;
k = subs(g,t,t-x);
j = subs(f,t,x);
if has(int(k*j, x, 0, t),'int')
k = subs(f,t,t-x);
j = subs(g,t,x);
else
k = subs(g,t,t-x);
j = subs(f,t,x);
fconvg = int(k*j, x, 0, t)
end
Accepted Answer
More Answers (1)
madhan ravi
on 23 May 2020
0 votes
Add a semicolon in the last line. And call the function with an output argument.
Categories
Find more on Creating and Concatenating Matrices 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!