How to write a symbolic summation(symbolic expression) in MATLAB?

时间:2015-11-12 11:29:46

标签: matlab symbolic-computation

I have an academic license for MATLAB for two months and in this version Simulink is not supported.

My problem is that I want to write a symbolic expression in MATLAB and the debugger shows me that I may need some features of Simulink. The part of code that I want to be converted to a supported format for MATLAB (without using Simulink tools) is the following:

syms k
f = theta*X-y;
V = subs(f, k, 1:m);
J = (1/(2*m))*sum(V);

How can this be done?

0 个答案:

没有答案
相关问题