| 5 | 1/1 | 返回列表 |
| 查看: 784 | 回復(fù): 4 | |||
jiasen1980金蟲 (正式寫手)
|
[交流]
【求助】那位高手幫看下MATLAB程序出錯(cuò)了
|
|
%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. |
鐵桿木蟲 (著名寫手)


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

木蟲 (著名寫手)
云中仙

| 5 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 生物學(xué)一志愿985,分?jǐn)?shù)349求調(diào)劑 +4 | zxts12 2026-03-21 | 7/350 |
|
|---|---|---|---|---|
|
[考研] 280求調(diào)劑 +11 | 咕嚕曉曉 2026-03-18 | 12/600 |
|
|
[考研] 初試 317 +7 | 半拉月丙 2026-03-20 | 7/350 |
|
|
[考研] 求調(diào)劑 +5 | 十三加油 2026-03-21 | 5/250 |
|
|
[考研] 工科0856求調(diào)劑 +3 | 沐析汀汀 2026-03-21 | 3/150 |
|
|
[考研] 317求調(diào)劑 +9 | 申子申申 2026-03-19 | 15/750 |
|
|
[考研] 材料與化工(0856)304求 B區(qū) 調(diào)劑 +3 | 邱gl 2026-03-21 | 3/150 |
|
|
[考研] 279分求調(diào)劑 一志愿211 +14 | chaojifeixia 2026-03-19 | 15/750 |
|
|
[考研] 330求調(diào)劑0854 +3 | assdll 2026-03-21 | 3/150 |
|
|
[考研] 296求調(diào)劑 +6 | www_q 2026-03-18 | 10/500 |
|
|
[考研] 085600材料與化工 +8 | 安全上岸! 2026-03-16 | 8/400 |
|
|
[考研] 一志愿武理材料工程348求調(diào)劑 +3 |  ̄^ ̄゜汗 2026-03-19 | 4/200 |
|
|
[考研] 一志愿華中農(nóng)業(yè)071010,總分320求調(diào)劑 +3 | 困困困困坤坤 2026-03-20 | 3/150 |
|
|
[論文投稿]
申請(qǐng)回稿延期一個(gè)月,編輯同意了。但系統(tǒng)上的時(shí)間沒變,給編輯又寫郵件了,沒回復(fù)
10+3
|
wangf9518 2026-03-17 | 4/200 |
|
|
[考研] 0854可跨調(diào)劑,一作一項(xiàng)核心論文五項(xiàng)專利,省、國級(jí)證書40+數(shù)一英一287 +8 | 小李0854 2026-03-16 | 8/400 |
|
|
[考研] 收復(fù)試調(diào)劑生 +4 | 雨后秋荷 2026-03-18 | 4/200 |
|
|
[考研] 334求調(diào)劑 +3 | 志存高遠(yuǎn)意在機(jī)?/a> 2026-03-16 | 3/150 |
|
|
[考研] 301求調(diào)劑 +4 | A_JiXing 2026-03-16 | 4/200 |
|
|
[論文投稿] 有沒有大佬發(fā)小論文能帶我個(gè)二作 +3 | 增銳漏人 2026-03-17 | 4/200 |
|
|
[考研] 333求調(diào)劑 +3 | 文思客 2026-03-16 | 7/350 |
|