How to define a function with a summation
17 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Rozalia Korycka
am 30 Mai 2019
Kommentiert: Sahil
am 18 Sep. 2022
Hello,
I'm fairly new to matlab so I'm not too familiar with the way all of the functions work. I need to plot a function I have been given :
but I am having trouble defining it. I've tried the following:
syms k x
f = matlabFunction(b0 + symsum(a(k)*sin(k*x) + b(k)*cos(k*x)));
This gives me an error stating "Invalid indexing or function definition. Indexing must follow MATLAB indexing. Function arguments must be symbolic variables, and function body must be sym expression."
Can someone help me out? :)
1 Kommentar
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!