matlab创建function出错,代码:function basePS=functionbasePS(n)%UNTITLED2 Summary of this function goes here% Detailed explanation goes heresyms tbasePS=zeros(1,n+1);for i=0:1:nif 0

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/13 04:33:21
matlab创建function出错,代码:function basePS=functionbasePS(n)%UNTITLED2 Summary of this function goes here% Detailed explanation goes heresyms tbasePS=zeros(1,n+1);for i=0:1:nif 0
x)M,ILz1]iy%yOw2S43 &Xl Cy~!!>.F E i % p E .%9) 9yŕ %PR5 u 52m 2 l,G'`U$y 3@|? l~LAݐi_oUa[$4Χ۟o~ohxcJjyں~u$/zJ>[ :lbw? 7uγΆ'>Z `<;PD[=

matlab创建function出错,代码:function basePS=functionbasePS(n)%UNTITLED2 Summary of this function goes here% Detailed explanation goes heresyms tbasePS=zeros(1,n+1);for i=0:1:nif 0
matlab创建function出错,
代码:
function basePS=functionbasePS(n)
%UNTITLED2 Summary of this function goes here
% Detailed explanation goes here
syms t
basePS=zeros(1,n+1);
for i=0:1:n
if 0

matlab创建function出错,代码:function basePS=functionbasePS(n)%UNTITLED2 Summary of this function goes here% Detailed explanation goes heresyms tbasePS=zeros(1,n+1);for i=0:1:nif 0
basePS(i)=nchoosek(ceil(n/2)+i,i)*t^i*(1-t)^(ceil(n/2)+1);等号右边是一个带t的公式,即存入 basePS(i)的是一个带t的公式,而不是正数或逻辑类型的数,所以报错