**Can Matlab solve a system of equations contain one pde(1-D) equation and 3 ode equations by the pdepe solver?**I have a system of equations contains one one-dimensional pde and
three ode. Can it be solved by the 'pdepe' solver?
If it can,how do I treat the boundary function of odes?
...

**Solve wave equation with pdepe?**Can pdepe solve the wave equation:
2 2
d u 2 d u
------ = v ------
2 2
d t d x
...

**Solving diffusion equation with pdepe**hello everyone i this error:
??? Error using ==> daeic12 at 77
This DAE appears to be of index greater than 1.
Error in ==> ode15s at 395
[y,yp,f0,dfdy,nFE,nPD,Jfac] = daeic12(odeFcn,odeArgs,t,ICtype,Mt,y,yp0,f0,...
Error in ==> pdepe at 320
[t,y] = ode15s(@pdeodes,t,y0,opts);
Error in ==> ec_connu at 9
sol = pdepe(m,@pdex1pde,@pdex1ic,@pdex1bc,x,t);
in this code:
function ec_connu
%con matlab
N=100;
m = 1;
x = linspace(1e-300,2.5,100);
t = linspace(0,1,N);
sol = pdepe(m,@pdex1pde,@pdex1ic,@pdex1bc,x,t);
% Extract the first solution component as u.
u = sol(:,:,1);
%...

**pdepe cannot solve partial differential equation**Dear all,
I am trying to solve a system of three coupled (nonlinear)
differential equations containing first order derivatives in time and
space, e.g. x-direction. When I try to solve the system I get the
following error:
"This DAE appears to be of index greater than 1."
Maybe I am not allowed to set the second order derivatives to zero,
because it is then neither parabolic nor elliptic.
Boundary conditions are all set to zero.
Did anybody encounter this same problem before?
Thanks
David
Source code:
function SRS_pde_solver_pulsed
lambda_p=1.545e-6; % [m]
g_R=10.5e-11; % Stim...

**method to solve a pdepe diffusion equation (help!!)**
Hi everyone. First of all I'm sorry for the english.
OK here is my problem.
I'm trying to solve this equation
[URL=http://img215.imageshack.us/i/im1c.png/][IMG]http://img215.imageshack.us/img215/8672/im1c.png[/IMG][/URL]
The code for that (with some conditions) is here (go to the end to see my questions :-) ):
function ec_connu_general3
N=100;
m = 1;
x = linspace(1,200,N);
t = linspace(1,150,N);
sol = pdepe(m,@pdex1pde,@pdex1ic,@pdex1bc,x,t);
% Extract the first solution component as u.
u = sol(:,:,1);
save pro5.mat
% A surface plot is often a good way to study a solution...

**solving composite heat transfer equations using 'pdepe'**:For given example regarding usage of 'pdepe', multiple system of equations are defined at interval 0 to 1. My question is what if both equations are for different intervals say
:0 to 5 :
:5 to 8. and
:Hence over all heat is transfered from 0 to 8.
: BC are
one bc at x=0
two BC at x=5
one BC at x=8
in all we have 4 BC and One IC for given set of 2 PDE.
It would be of help if someone could help me out for solving this form of PDE.
regards
Jaidev
Hello Jaidev,
I know this post is really old, but did you get an answer to your problem?
I...

**solving an array of equations with solve**Hello,
I want to find zeros of a system of equations, eq=[eq(1),..,eq(n)].
But solve(eq) doesn't seem to work here, yet
solve(eq(1),..,eq(n)) does.
Suggestions?
Thanks.
...

**difference equations to solve wave equation**i am new in matlab. Can any one help out in how to solve a the wave equation using finite difference methods(Say the five point method). I will be grateful. Thanks
On May 13, 3:42=A0pm, "Kayanja Andy" <kayanja.and...@yahoo.com> wrote:
> i am new in matlab. Can any one help out in how to solve a the wave equat=
ion using finite difference methods(Say the five point method). I will be g=
rateful. Thanks
what have YOU done so far to solve YOUR particular problem...
us
"Kayanja Andy" <kayanja.andrew@yahoo.com> wrote in message
news:hsgvjc$c11$1@f...

**Given an iterative equation to solve an equation**An iterative equation for solving the equation x^2-x-1=0 is given by
x(r+1)=1+(1/x(r)) for r=0,1,2,...
Given x0=2, write a Matlab script to solve the equation. Sufficient accuracy is obtained when abs(x(r+1)-x(r))<.0005.
I am a new to Matlab and I am having a hard time really even starting this problem. I was thinking that using some sort of loop until the accuracy condition is met would work. Any help would be much appreciated.
Thanks in advance,
Jacob
"Jacob" wrote in message <kdf58n$958$1@newscl01ah.mathworks.com>...
> An iterative equation for solvin...

**Problem solving equation using Solve**I compute a derivative of a function od fime which contains the variables
ax,ay,bx,by,cx,cy,centerOfMassx,centerOfMassy, beta and v.
These variables are all real numbers.
By doing
afgeleide =
FullSimplify[
D[Cones[beta, v],
v], {{ax, ay, bx, by, cx, cy, dx, dy, centerOfMassx,
centerOfMassy} \[Element] Reals}, TimeConstraint -> 5]
I get the following, for which I want to compute solutions = Solve[afgeleide
== 0, v]
But the problem is that this is too hard for my pc to solve with
mathematica, can anyone help me to change the function so that mathematica
can handle i...

**Can you solve this in matlab2009b 64 bit? (systems of equations to be solved using "solve")**Hi all,
Can you solve the following in matlab 2009b 64 bit (macosx with snow leopard)? I get the errors given below the code. It takes a lot of time before Matlab gives the error. Where do I go wrong?
%-----------------------
syms p0 p00 p1 p2 cn cr dn dr a an ar bn br T tau real;
myfun = [ -(tau*(2*an + 2*bn*cn - 4*bn*p1 - dn*tau))/2; -(tau*(2*ar + 2*br*cr - 4*br*p0 - dr*tau))/2; ((T - tau)*(T*dn - 2*an - 2*bn*cn + 4*bn*p2 + dn*tau))/2; ((T - tau)*(T*dr - 2*ar - 2*br*cr + 4*br*p00 + dr*tau))/2; an*p2 - an*p1 - ar*p0 + ar*p00 + bn*p1^2 - bn*p2^2 + br*p0^2 - br*p00^2 - bn*cn*p1 + bn*c...

**solving system of equation with "solve"**Hi,
I'm trzing to solve system of non-linear equations using
"solve" and I gat this error message. Thak you for any help.
--- code:
syms x1 x2 x3 a1 a2 R50 R51 R16 R14 R35 R17 R19 R6 R52 R36
Fs =[a1*sin(x2)-R16*sin(x1)-R50, R16*cos(x1)+a1*cos(x2)-R51,
R14^2-R51^2-R50^2,
R16*cos(x1)+(a1+a2)*cos(x2)+R35*cos(x3)-R52,
(a1+a2)*sin(x2)-R16*sin(x1)-R35*sin(x3)-(R19-R6)/2,
x1+x2-R17, x2+x3-R36];
[x1,x2,x3,a1,a2,R50,R51]=solve(Fs);
--- message:
"Error, (in solve) invalid arguments"
P.S.: I tried solving it using "fsolve" but there I get this
message (Optimizatio...

**How to solve simulate/ solve difference equation in Matlab?**How can I simulate or solve this kind of difference equation?
x(k+2)-7x(k+1)+12x(k)=0
A for loop would work nicely. This particular system is unstable.
-James
Tama Tomi wrote:
> How can I simulate or solve this kind of difference equation?
>
> x(k+2)-7x(k+1)+12x(k)=0
Can you give me a example?
James Allison <james.allison@mathworks.com> wrote in message <hmr9fp$62s$1@fred.mathworks.com>...
> A for loop would work nicely. This particular system is unstable.
>
> -James
>
> Tama Tomi wrote:
> > How can I simulate or solve this kind of...

**question about "solve" for solving equation**Hellow!
I try to solve the following complex number equations:
..57656275472770359600926119844372e42*yita^2+.5438966091202114236344849
5468593e42*X^4-.22956779921876079684793874565208e42*X^6+.1690034374115
9551672322834315704e42+.54184776066768190965940275064713e41*i*X^5+.836
85682606372611137087763995977e41*i*X-.51266530898805208528073011534041
e41*i*X^3=0.
so I use
syms a x
a=.57656275472770359600926119844372e42*yita^2+.54389660912021142363448
495468593e42*X^4-.22956779921876079684793874565208e42*X^6+.16900343741
159551672322834315704e42+.54184776066768190965940275064713e41*i*X^5+.8
3685682...

**Solving simple mathematical equation solving speed**Hi all,
I have an equation that gets executing many thousands of times by an
algorithm. When I it is written in code the algorithm is quite fast.
However, I want the user to be able to define the equation themselves,
to solve it this way I use java expression parser (JEP).
For a test example, the algorithm using the hard coded version runs in
about 2 seconds, but using JEP, it takes in the order of 50 seconds! The
expression is only parsed once by JEP, but evaluated many times with
different values.
The expression I'm using looks like: A - (B / C) * D
Does anyone know if such a t...

**How can I solve this equation with Solve or Reduce or whatever for**
Hi All,
Given that the following equation is true.
Clear[NoOf360Rotations]
NoOf360Rotations = 108
ArcTan[Tan[Degree*(180 - 1.5267134447254718*(18.43494882292201 +
360*NoOf360Rotations))]] == 0.23101849674392247
TRUE
How can I solve this equation with Solve or Reduce or whatever for the
required value NoOf360Rotations = 108
Only want Integer return of NoOf360Rotations AND to equal 108
Any help or advice gratefully received.
Best regards,
Lea=85
...

**solving a non linear equations using SOLVE**Hello
I am using the solve command as follow
[u,v] = solve('a*u^2 + v^2 = 0','u - v = 1')
my problem is that even if I define or tell matlab what "a" is, it
solve the 2 equations treating "a" as an unknown parameters.
I can always use the "subs" command after the solve command to
subsitute "a" by its value.
However, it is not an option for what I want to do. I want to
automate the solve process, so hard coding the value of "a" in the
equations is not options i.e
let say a=2
[u,v] = solve('2*u^2 + v^2 = 0','u - v =...

**Solving nonlinear equation system with lsqnonlin**Hello all,
I working with the nonlinear solver lsqnonlin in order to solve a
nonlinear equation system f(x)-g(x) = 0. There two different types of
equations in this system, ie. f1(x)-g1(x) and f2(x)-g2(x). The
absolute values of the f and g are very different for these two types.
The first ist about 1 and the other in the range of 1*10-6. This means
that although I have quite good starting values, the values of the two
equations f1(x0)-g1(x0) and f2(x0)-g2(x0) are extremly differing by
many orders of magnitude. Because of that, lsqnonlin is only
optimizing the first equations with the larger ...

**Re: How can I solve this equation with Solve or Reduce or whatever for**> ArcTan[Tan[Degree*(180 - 1.5267134447254718*(18.43494882292201 +
> 360*NoOf360Rotations))]] == 0.23101849674392247
> Only want Integer return of NoOf360Rotations AND to equal 108
Hi. Another way might be to move everything to the left-hand side of the equation.
ArcTan[Tan[Degree*(180-1.5267134447254718*(18.43494882292201+360*x))]] - 0.23101849674392247
f=FullSimplify[%]
-0.231018+ArcTan[Tan[2.65037 -9.59262 x]]
Now:
Minimize[{Abs[f],0<x<200},x,Integers]
{2.77556*10^-17,{x->108}}
The value of 2.77*10^-17 is pretty close to zero, and will t...

**How can I solve the warnings when solving the differential-algebraic equations**Hello everyone,
Today I met a problem when I was trying to solve the Differential- Algebraic equations.
what can cause this warning:
1, "Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN."
2, Warning: Failure at t=0.000000e+000. Unable to meet integration tolerances
without reducing the step size below the smallest value allowed (7.905050e-323) at
time t.
The code is as follows:
clear
clc
%% constant prarameters
nm = 10^-9;
ms = 10^-3;
c=2.998*10^8;
um=10^-6;
Epsilon_0=8.85*10^-12;
neff=1.45;
...

**equation solving**hi,
i'm a bit confused, hope someone help me...
here is my equations:
for a = =CE=BBd / (=CE=BBd + =CE=BBin)
P(0,0)= 1 /
( k + ((k-1) * (=CE=BBin/=CE=BCin)) + ((k-1) * (=CE=BBin/=CE=BCm)) +
(a * ((1-a^(n-k))/(1-a))) +
(a * ((1-a^(n-k))/(1-a)) * (=CE=BBin/=CE=BCin)) +
(a * ((1-a^(n-k))/(1-a)) * (=CE=BBin/=CE=BCM)) +
((a^(n-k) * (=CE=BBd/=CE=BCD))
)
Availability (A) = P(0,0)*(k + (a * (1-a^(n-k))))
i want to find the optimal =CE=BBin which max. the availability.. is there
any way to solve without giving any numerical values? i use D[A, =CE=BBin]
but without numerical...

**solving equations**My file a.txt contains these equations:
x == Csource.receiverRole.RT
Csource.receiverRole.RT == Csource.sendRole.RT + Csource.TT
Csource.sendRole.RT == A.inputPort.RT
A.inputPort.RT == A.outputPort.RT + A.PT
A.ouputPort.RT == C.receiverRole.RT
C.receiverRole.RT == C.sendRole.RT + C.TT
C.sendRole.RT == B.inputPort.RT
B.inputPort.RT == B.outputPort.RT + B.PT
B.ouputPort.RT == Csink.receiverRole.RT
Csink.receiverRole.RT == Csink.sendRole.RT + Csink.TT
Csink.sendRole.RT == DataSink.inputPort.RT
DataSink.inputPort.RT == 0
Csource.TT == 0
Csink.TT == 0
C.TT == 0.5
A.PT == 2
B.PT =...

**how to solve these equations**Hi all,
I want to solve the two equations
u*tan(u)=w
and
u^2 + w^2=V^2, where V is a known constant, and u and w are the two
unknowns to be determined. Please can someone suggest me how to write a
code and solve these equations in C or C++? I am not an expert, but
have elementary working knowledge of C.
Thanks
vj
vj wrote:
> Hi all,
>
> I want to solve the two equations
>
> u*tan(u)=w
> and
> u^2 + w^2=V^2, where V is a known constant, and u and w are the two
> unknowns to be determined. Please can someone suggest me how to write a
> code and solve these equat...

**Matlab program to solve wave equation up to linear system of equations**New in matlab, Need help please in making a matlab program to solve the wave equation below up to the point when you obtain a system of equations.
solve the wave equation below up to the system of equation using Finite difference method
utt = c^2 uxx, ut(x,0) = 3sin((pi x)/9) , u(x,0) = 0, U(0,t) = U(4,t) = 0,
hx = 1, ht = 0.5, c = 2, nx = 4, nt = 2
nx, hx are number and size of x panels
nt, ht are number and size of t panels
I am using the Finite difference scheme below
u(i,j+1) = c^2*(ht/hx)^2 *(u(i+1,j) + u(i-1,j)) - u(i,j-1) + 2*(1 - c^2*(ht/hx)^2 )*u(i,j)
"Kayanja Andy...