You can use a simple for loop to represent the heat flux applied to one side of a plane wall for 0.2 seconds every 1 second in MATLAB. Here is an example code:
main.m816 chars26 lines
This code defines a time vector from 0 to 10 seconds with a small time step of 0.01 seconds. It also defines a heat flux vector with all values initialized to zero, except for the intervals where a heat flux is applied. Finally, it loops through the time vector and applies the heat flux at the appropriate intervals. It then plots the resulting heat flux over time.
gistlibby LogSnag