Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I'm supposed to do the Java AND C versions of this program showing the graphic it generates, and invert the graphic once again JAVA and
I'm supposed to do the Java AND C versions of this program showing the graphic it generates, and invert the graphic
once again JAVA and C versions. they should work
A pseudocode for this might look something like itialize x, V, and A for n values of each for (tetfinal dvdtd2Adx2 for all i not on boundary dat = 0 on A = A + V*dt for all i V = V + dVdt*dt for all i out put end for A simple implementation in MATLAB could be written as clear all close all clc n=100; xlinspace (o, 10,n V = 0.0*x; A = exp (-(x-5.0).*2) d/dt = 0.0*x; dxsquared dx*dx; nt= 1000 tgrid = linspace (0, 10, nt); dt tgrid ( 2 )-tgrid (1); for t tgrid for i 2:n-1 = dat (i) = (A(1+1)+A (1-1)-2.0*A (i))/dxsquared; end A = A + V* dt; plot (x, A) pause (0.0001) endStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started