Course Solutions Uncategorized (Solved) : Modify Code Question Include Include Int Main Void File Fileout Int Ix Iy Nt Double Newv 3 Q38038770 . . . .

(Solved) : Modify Code Question Include Include Int Main Void File Fileout Int Ix Iy Nt Double Newv 3 Q38038770 . . . .

 

Modify this code for question:

#include <stdio.h>

#include <math.h>

int main(void)

{

FILE * fileout;

int ix,iy,it,Nt;

double newV[31][21],V[31][21],x,dx,y,dy;

fileout=fopen(“buckbeak.dat”,”w”);

printf(“nEnter number of iterations “);

scanf(“%d”,&Nt);

dx=0.10;

dy=0.10;

  

for(iy=0; iy<21; iy=iy+1)

{

for(ix=0; ix<31; ix=ix+1)

{

V[ix][iy]=0.0;

}

}

iy=20;

for (ix=0;ix<31; ix=ix+1)

   {

   V[ix][iy]=8.0;

   }

for (it=0; it<Nt;it=it+1)

{

for(iy=1; iy<20;iy=iy+1)

{

for(ix=1;ix<30; ix=ix+1)

{

newV[ix][iy]=0.25*(V[ix+1][iy]+V[ix-1][iy]+V[ix][iy+1]+V[ix][iy-1]);

}

}

for (iy=1; iy<20; iy=iy+1)

{

for(ix=1; ix<30; ix=ix+1)

{

V[ix][iy]=newV[ix][iy];

}

}

  

}

for (iy=0;iy<21;iy=iy+1)

{

y=dy*iy;

for (ix=0;ix<31;ix=ix+1)

{

x=dx*ix;

fprintf(fileout,”n %8.4lf %8.4lf %8.4lf”,x,y,V[ix][iy]);

}

fprintf(fileout,”n”);

}

printf(“n V at box center %12.6lf”, V[15][10]);

fclose(fileout);

printf(“n”);

return 0;

}

*** Question: Modify your Laplace code above to do a finger gridof points inside the box: dx=dy=0.01.

***** please help!!! and only help if you know how to do it toyour best capability. please show all work and write neat and clearfor me to follow what you are saying. Please answer all questionsand explain the answers

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Solved) : Cpsc 58000 Communications Networking Assignment 2 1 Inthe Mlt 3 Three Transition Rules Thr Q32457408 . . . .(Solved) : Cpsc 58000 Communications Networking Assignment 2 1 Inthe Mlt 3 Three Transition Rules Thr Q32457408 . . . .

The assignment is in the screenshot below. Thanks inadvance<br/><img src="https://media.cheggcdn.com/media%2F81a%2F81af44f1-ee1d-4d46-8e78-542f3b9865cd%2Fimage.png" alt="CPSC 58000 Communications and Networking Assignment #2 1. Inthe MLT-3, there are three transition rules and three levels (-V, 0,