Question

Check the file: Questions.pdf

Solution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

Problem 1:

T=1;
n=100;m=10;
dt=T/n;
xmin=-1; xmax=1;
dx=2/m;
t=0:dt:T; x=-1:dx:1;
U=zeros(m+1,n+1);
U(:,1)=2*x'+1;
U(1,:)=-ones(n+1,1);
U(m+1,:)=3*ones(n+1,1);
alpha=dt/dx^2;
% d1=diag(ones(1,m-1));d2=diag(ones(1,m-2),1)...
%    +diag(ones(1,m-2),-1);
% A=(1+alpha)*d1-0.5*alpha*d2;
% B=(1-alpha)*d1+0.5*alpha*d2;
A=(1+alpha)*diag(ones(1,m-1))-0.5*alpha*diag(ones(1,m-2),1)...
    -0.5*alpha*diag(ones(1,m-2),-1);
B=0.5*alpha*(-2*diag(ones(1,m-1))+diag(ones(1,m-2),1)...
    +diag(ones(1,m-2),-1));
inv(A)
for k=1:n...

This is only a preview of the solution. Please use the purchase button to see the entire solution

$80.00

or $1 if you
register a new account!

Related Homework Solutions

Matlab Problems
Homework Solution
$75.00
Matlab
Mathematics
Computer Science
Hyperbolic Secant Function
Exponential Function
Axis Labels
Scripts
Tables
Diary File
Recording
Algorithms
Compiling
Word Processed Files
Variables
Statements
Programming
MATLAB Exercises
Homework Solution
$23.00
Mathematics
MATLAB
Exercises
Command
Plot
Equation
Function
Graph
Systems of Linear Equations & Finance Problems in Matlab
Homework Solution
$58.00
Matlab
Mathematics
Computer Science
Linear Equations
Script Files
Codes
Matrices
Determinants
Division Command
Transposed System
Plots
Vectors
Mesh Command
Arrays
Investments
Loans
Finance
Interest Rate
Variables
Loops
Cash
Least-Squares Crossing Lines in Matlab
Homework Solution
$75.00
Matlab
Mathematics
Computer Science
XY Plane
Data in Space
Configuration
Output
Input
Line Errors
Uniform Distribution
Numerical Codes
Planar Points
Nearly Crossing Lines
Codes
Statements
Loops
Variables
Skew Lines
Least-Square Focal Poi
Spacecraft Problem in Matlab
Homework Solution
$25.00
Mathematics
Computer Science
Spacecraft
Velocity
Derivatives
Input
Output
Acceleration Elements
Low Earth OrbitFunctions
Vectors
Time
Partials
Matlab Problems
Homework Solution
$38.00
Computer Science
Mathematics
Matlab
Programming
Arrays
Binary Approximation
Series
Zeros
Min/Max Values
Root Function
Round-Off Error
Functions
Statements
Variables
Plots
Get help from a qualified tutor
Live Chats