Question: Set up your code so it has the following input parameters: p = 0 . 4 ( probability ) n = 2 0 ( matrix
Set up your code so it has the following input parameters:
p probability
n matrix size
maxt number of iterations
and evolves the wildfire using these input parameters for maxt iterations. Make sure the code is annotated.
Ideally, the code should print an mp movie of the evolving matrix.
To to this in Matlab, use the following command:
Open the video file
vidfile VideoWritertestmoviemp'MPEG;
openvidfile;
for k:maxt. Looping over all timesteps
imagescMmov::k this creates an image of the step k matrix
Fk getframegcf; this records the image
writeVideovidfileFk; this appends it to the video
end
closevidfile matlab
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
