**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 Differential Equation using pdepe solver**Problem - There is a cylinder filled with some spherical shaped filler particles with porosity 0.7. Some fluid at 673k is passed through it to charge it with heat energy. The governing equations are simultaneous PDEs. I want to solve ( to obtain the plots of u1 vs time and distance and u2 vs time and distance) this system of Partial differential equations using pdepe solver (or by any means). I got help from example no. 2 on this page ( http://www.mathworks.in/help/matlab/ref/pdepe.html ). Equations are:- (below d means partial differentiator and one can assume the vaue of constants)
a1*(d...

**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...

**solving quadratic equation with the solve-function**I am trying to solve something like this:
t = sym('t');
T = [t t t]';
v = (C-T)./delta;
s = solve(v'*A^-1*(A^-1)'*v==1,t);
C is 3x1, delta is 3x1, A is 3x3. I have some problems:
1)
The solve-function takes too much time. I need to solve this problem for several different values of C, A and delta, as fast as possible. Is there a faster way of solving this problem?
2)
I get some warning messages, such as:
Warning: Explicit solution could not be found.
> In solve at 179
In fmmComb>computeTau at 78
In fmmComb...

**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 quadratic equation with the solve-function #2**I am trying to solve something like this:
t = sym('t');
T = [t t t]';
v = (C-T)./delta;
s = solve(v'*A^-1*(A^-1)'*v==1,t);
C is 3x1, delta is 3x1, A is 3x3. I have some problems:
1)
The solve-function takes too much time. I need to solve this problem for several different values of C, A and delta, as fast as possible. Is there a faster way of solving this problem?
2)
I get some warning messages, such as:
Warning: Explicit solution could not be found.
> In solve at 179
In fmmComb>computeTau at 78
In fmmComb...

**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;
...

**solving pair of interdependent trigonometric equations with Solve command**Hi all,
I am trying to find solution of the two interdependent trigonometric transcendental equations with solve command.
The equations can be solved by the MATLAB command "solve" but the solution i get from the solve command for two variables is in "atan" form and not in a form of value.
can anyone please guide me how to get the solution set as a numbers and not in form of long equation forms.
Also sending the code of MATLAB.
syms thx thz
disp ('enter the distance of travel');
D = input ('enter distance in mm : ');
disp ('enter the f...