help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

help with m file


From: whiffee
Subject: help with m file
Date: Thu, 20 Dec 2018 11:38:33 -0600 (CST)

hi All, 

I made a couple of changes to this matlab file, but it's not
running yet. Next to last line is original and not right. Does 
someone have a suggestion?

function [p,dp,q,r,alp,dom,x,wint,wipr]=ex1(n)
global n
figure(1);title('Fourier equation, Dirichlet problem: -u"=lambda*u,
u(0)=u(1)=0');hold on;
disp('Fourier equation, Dirichlet problem: -u"=lambda*u, u(0)=u(1)=0');
dom=[0,1];alpha=(dom(2)-dom(1))/2;beta=(dom(2)+dom(1))/2;
e1=ones(n,1)/2;e2=e1;e2(2)=1;X=spdiags([e1,e2],[-1,1],n,n);
X=alpha*X+beta*eye(size (n));
p=1;
dp=0;
q=0;
r=1;
alp=[1,0;1,0];
[x,wint]=pd(n,dom);
wipr=ones(n,1);

thanks,
whiffee



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]