How to calculate approximation error from 1x1 and 1x1001 symbolic signals
2 views (last 30 days)
Show older comments
Hi,
I need to calculate the approximation error from two signals, one is a triangularPulse function from matlab( which generates 1x1 symbolic), and the other one is a 1x1001 symbolic. How can I split the triangularPulse into a 1x1001 array so I can calculate the error?
0 Comments
Answers (1)
Star Strider
on 24 Mar 2019
Much depends opn how you defined your triangularPulse.
One option:
syms x T(x)
T(x) = triangularPulse(x);
Tfcn = matlabFunction(T);
t = linspace(-1, 1, 1001);
Tvct = Tfcn(t);
figure
plot(t, Tvct)
grid on
The plot call simply presents the result. It is not necessary for the code.
Experiment to get the result you want.
0 Comments
See Also
Categories
Find more on Number Theory in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!