| 5 | 1/1 | 返回列表 |
| 查看: 785 | 回復(fù): 4 | |||
jiasen1980金蟲 (正式寫手)
|
[交流]
【求助】那位高手幫看下MATLAB程序出錯了
|
|
%FWT on the NLS equation i*du/dt+alpha*d^2u/dx^2+nu*|u|^2*u=0 %x=linspace(-3,3,1000);u=exp(2*x.^2);[c,L]=wavedec(u,3,'sym6');A=wrcoef('a',c,L,'sym6',3); %plot(x,u,'x',x,A,'r') %-----Claculate the wavelet------- xmax=16; level=3; alpha=1/2; nu=1; deltat=5*10^(-5); maxtime=2; iter=3; wav='sym6'; [phi,psi,xval]=wavefun(wav,iter); hval=xval(2)-xval(1); MX=max(xval); s=1; % mm=0; % jump=10^(s+1); flag=1; for t=0:deltat:maxtime if flag==1 flag=0; thresh=2^(level-3)*10^-5; phin=2^(level/2)*phi; psin=2^(level/2)*psi; lenphi=length(phin); shift=floor(lenphi/MX); N=xmax*2^level-(MX-1); lenPHI=(N-1)*shift+lenphi; x=linspace(-xmax/2,xmax/2,lenPHI); h=x(2)-x(1); %--------------Clculate the initial approximation of u-------------- if t==0 ua=3*sech(x); end t=0; for L=1:N aold(1,L)=h*ua((L-1)*shift+1 L-1)*shift+lenphi)*phin';end for L=1:N b(1,L)=h*ua((L-1)*shift+1 L-1)*shift+lenphi)*psin';end u0=zeros(1,lenPHI); for L=1:N u0(1,(L-1)*shift+1 L-1)*shift+lenphi)=u0(1,(L-1)*shift+1 L-1)*shift+lenphi)+aold(1,L)*phin;end figure plot(x,ua,'k',x,u0,'r'); title(strcat('xmax=',num2str(xmax),',alpha=',num2str(alpha),',\nu=',num2str(nu),',maxtime=',num2str(maxtime),',deltat=',num2str(deltat),',level=',num2str(level),',iter=',num2str(iter),',time=',num2str(t))); %----Calculate KM Matrix for sym6 load sym6KMburg3; for L=1:N for K=1:N if abs(L-K) end end end %------------- load sym6LambdaNLS3; end % U=zeros(floor(maxtime/(jump*deltat))+1,lenPHI); %----Calculate C Matrix----------------- C=zeros(N,N); for L=1:N for K=1:N if abs(L-K) if abs(m-K) if abs(n-K) end end end end end end end % % for L=1:N % % for K=1:N % % if abs(L-K) % % end % % end % % end % %a=a+i*a*Mat; anon=aold+i*deltat*aold*nu*C; alin=anon+i*deltat*anon*alpha*KM; anew=alin; aold=anew; if max(abs(aold))>50 u=zeros(1,lenPHI); for L=1:N u(1,(L-1)*shift+1 L-1)*shift+lenphi)=u(1,(L-1)*shift+1 L-1)*shift+lenphi)+abs(aold(1,L))*phi;end figure plot(x,u0,'r',x,u,'k'); title(strcat('xmax=',num2str(xmax),',alpha=',num2str(alpha),',\nu=',num2str(nu),',maxtime=',num2str(maxtime),',deltat=',num2str(deltat),',level=',num2str(level),',iter=',num2str(iter),',time=',num2str(t))); break; end u=zeros(1,lenPHI); for L=1:N u(1,(L-1)*shift+1 L-1)*shift+lenphi)=u(1,(L-1)*shift+1 L-1)*shift+lenphi)+abs(aold(1,L))*phin;end for L=1:N b(1,L)=h*u((L-1)*shift+1 L-1)*shift+lenphi)*psin';end if max(abs(b))>thresh max(abs(b)); level=level+1; flag=1; ut=interp(u,2); ua=ut(1:length(ut)-1); % a=interp(a,2); end % if t == (mm*jump*deltat) % u=zeros(1,lenPHI); % for L=1:N % u(1,(L-1)*shift+1 L-1)*shift+lenphi)=u(1,(L-1)*shift+1 L-1)*shift+lenphi)+abs(aold(1,L))*phin;% end % mm=mm+1; % U(mm, =u;% end if t==deltat*10^(s+1)|t==deltat*10^(s+2)|t==deltat*10^(s+3)|t==deltat*10^(s+4)|t==0.5|t==0.75|t==1.5|t==1.75|t==2u=zeros(1,lenPHI); for L=1:N u(1,(L-1)*shift+1 L-1)*shift+lenphi)=u(1,(L-1)*shift+1 L-1)*shift+lenphi)+abs(aold(1,L))*phin;end figure plot(x,u0,'r',x,u,'k'); title(strcat('xmax=',num2str(xmax),',alpha=',num2str(alpha),',\nu=',num2str(nu),',maxtime=',num2str(maxtime),',deltat=',num2str(deltat),',level=',num2str(level),',iter=',num2str(iter),',time=',num2str(t))); end end % figure % S=size(U); % % tp=[0:1:S(1)-1]; % tp=linspace(0,maxtime,S(1)); % [X,T]=meshgrid(x,tp); % mesh(X,T,U); % title(strcat('xmax=',num2str(xmax),',alpha=',num2str(alpha),',\nu=',num2str(nu),',maxtime=',num2str(maxtime),',deltat=',num2str(deltat),',level=',num2str(level),',iter=',num2str(iter),',time=',num2str(t))); ??? Error using ==> load Unable to read file sym6KMburg3: No such file or directory. |
鐵桿木蟲 (著名寫手)


|
錯誤提示已經(jīng)給的很明確了: Unable to read file sym6KMburg3: No such file or directory. 沒找到sym6KMburg3文件 確認一下這是什么文件,如果有該文件,文件路徑是什么?要么復(fù)制到當前工作目錄下,或設(shè)置以下相應(yīng)路徑。 |

木蟲 (著名寫手)
云中仙

| 5 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 328求調(diào)劑,英語六級551,有科研經(jīng)歷 +5 | 生物工程調(diào)劑 2026-03-17 | 9/450 |
|
|---|---|---|---|---|
|
[考研] 材料與化工(0856)304求 B區(qū) 調(diào)劑 +3 | 邱gl 2026-03-21 | 3/150 |
|
|
[考研] 265求調(diào)劑 +12 | 梁梁校校 2026-03-19 | 14/700 |
|
|
[考研] 085601調(diào)劑 358分 +3 | zzzzggh 2026-03-20 | 4/200 |
|
|
[考研] 一志愿山大07化學(xué) 332分 四六級已過 本科山東雙非 求調(diào)劑! +3 | 不想理你 2026-03-16 | 3/150 |
|
|
[考研] 一志愿天津大學(xué)化學(xué)工藝專業(yè)(081702)315分求調(diào)劑 +12 | yangfz 2026-03-17 | 12/600 |
|
|
[考研] 299求調(diào)劑 +6 | △小透明* 2026-03-17 | 6/300 |
|
|
[考研] 材料 336 求調(diào)劑 +3 | An@. 2026-03-18 | 4/200 |
|
|
[考研] 一志愿 西北大學(xué) ,070300化學(xué)學(xué)碩,總分287,雙非一本,求調(diào)劑。 +3 | 晨昏線與星海 2026-03-18 | 3/150 |
|
|
[考研] 材料專業(yè)求調(diào)劑 +6 | hanamiko 2026-03-18 | 6/300 |
|
|
[考研] 一志愿南昌大學(xué),327分,材料與化工085600 +9 | Ncdx123456 2026-03-19 | 9/450 |
|
|
[考研] 一志愿中海洋材料工程專碩330分求調(diào)劑 +8 | 小材化本科 2026-03-18 | 8/400 |
|
|
[考研] 317求調(diào)劑 +5 | 申子申申 2026-03-19 | 9/450 |
|
|
[考研] 298-一志愿中國農(nóng)業(yè)大學(xué)-求調(diào)劑 +9 | 手機用戶 2026-03-17 | 9/450 |
|
|
[考研] 085410人工智能專碩317求調(diào)劑(0854都可以) +4 | xbxudjdn 2026-03-18 | 4/200 |
|
|
[考研] 生物學(xué)調(diào)劑招人!! +3 | 山海天嵐 2026-03-17 | 4/200 |
|
|
[考博] 申博26年 +3 | 八6八68 2026-03-19 | 3/150 |
|
|
[考研] 材料考研調(diào)劑 +3 | xwt。 2026-03-19 | 3/150 |
|
|
[考研] 085601專碩,總分342求調(diào)劑,地區(qū)不限 +5 | share_joy 2026-03-16 | 5/250 |
|
|
[考研] 一志愿蘇州大學(xué)材料工程(085601)專碩有科研經(jīng)歷三項國獎兩個實用型專利一項省級立項 +6 | 大火山小火山 2026-03-16 | 8/400 |
|