How do i implement a sum containing the index as an exponent and plot it?
Show older comments
Hey there,
I am trying to use the following function in Matlab:

I've tried using the symsum function to implement my problem but I receive errors. This is the script I'm trying to run:
clear all
close all
clc
n_k=291;
T=0:0.01:1;
syms u;
expr=(n_k*T^(u-1))/factorial(u-1);
F_kt(T)=1- exp(-n_k*T)*symsum(expr, u, 1, n_k);
plot(T,F_kt)
I receive the following errors:
Error using mupadmex
Error in MuPAD command: Not a square matrix.
[(Dom::Matrix(Dom::ExpressionField()))::_power]
Error in sym/symsum (line 65)
rSym = mupadmex('symobj::map',f.s,'symobj::symsum',x.s,a.s,b.s);
Error in TEST (line 15)
F_kt(T)=1- exp(-n_k*T)*symsum(expr, u, 1, n_k);
As far as I understand there is a problem in the exponent of T. I'd be grateful if anyone could explain to me what I am doing wrong.
Regards
Answers (0)
Categories
Find more on Plot Settings 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!