好的,问题是,我想接收数学函数。在程序运行之前我不知道有多少。
当它运行时,我会询问n
我将要接收的一些功能,并开始从输入中保存它们。
到目前为止我有这个
function test()
n = input('number of equations?');
v = [1:n]
%in an ideal world, this ^ here would allow me to put a string in each position but
% they are not the same type and I understand that.. but how can I build a vector for saving my functions
%I want a vector where I can put strings in each position that is what I need
for i=1:n
x = input('what is the function?','s');
v(i)=x
end
v
%this would be my vector already changed with a function in each position.
end