Cody

Problem 46084. Parabolic Partial Differential Equations: Explicit Method

Solution 2765044

Submitted on 31 Jul 2020 by A C
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
% INPUTS L = .05; %meter tf = 9; %s final time T = pderod(L,tf) % C T_correct = [100.0000 100.0000 100.0000 100.0000 100.0000 20.0000 53.9089 59.0725 65.9508 85.0000 20.0000 20.0000 34.3727 39.1307 70.0000 20.0000 20.0000 20.8983 27.2639 55.0000 20.0000 22.1193 22.4420 22.8719 40.0000 25.0000 25.0000 25.0000 25.0000 25.0000]; %ismembertol(A, B, 0.05, 'ByRows', true) [rows cols] = size(T); for i =1:rows assert(ismembertol(T(i,:),T_correct,.2,'ByRows',true)); end

T = 100.0000 100.0000 100.0000 100.0000 100.0000 20.0000 53.9089 59.0725 65.9508 85.0000 20.0000 20.0000 34.3727 39.1307 70.0000 20.0000 20.0000 20.8983 27.2639 55.0000 20.0000 22.1193 22.4420 22.8719 40.0000 25.0000 25.0000 25.0000 25.0000 25.0000

2   Pass
% INPUTS L = .10; %meter tf = 102; %s final time T = pderod(L,tf) % C T_correct = [100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 20.0000 28.4772 35.1579 40.5179 44.8926 48.5211 51.5762 54.1838 56.4375 58.4071 60.1460 61.6949 63.0856 64.3431 65.4874 66.5344 67.4973 68.3867 69.2115 69.9791 70.6957 71.3666 71.9963 72.5887 73.1472 73.6746 74.1735 74.6463 75.0947 75.5206 75.9256 76.3111 76.6782 77.0283 77.3622 85.0000 20.0000 20.0000 20.8983 22.3201 24.0280 25.8726 27.7607 29.6354 31.4629 33.2239 34.9089 36.5138 38.0384 39.4848 40.8559 42.1556 43.3879 44.5569 45.6666 46.7206 47.7226 48.6758 49.5832 50.4477 51.2717 52.0578 52.8081 53.5245 54.2090 54.8632 55.4887 56.0871 56.6596 57.2077 57.7323 70.0000 20.0000 20.0000 20.0561 20.2398 20.5707 21.0425 21.6372 22.3328 23.1075 23.9414 24.8173 25.7209 26.6402 27.5657 28.4898 29.4063 30.3106 31.1990 32.0688 32.9179 33.7447 34.5484 35.3281 36.0835 36.8145 37.5211 38.2035 38.8621 39.4971 40.1091 40.6987 41.2663 41.8126 42.3382 42.8437 55.0000 20.0000 20.5298 20.9474 21.2824 21.5658 21.8243 22.0780 22.3409 22.6218 22.9253 23.2528 23.6037 23.9760 24.3669 24.7729 25.1908 25.6173 26.0492 26.4837 26.9183 27.3508 27.7792 28.2020 28.6178 29.0256 29.4244 29.8135 30.1925 30.5609 30.9186 31.2653 31.6010 31.9257 32.2395 32.5425 40.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000]; %ismembertol(A, B, 0.05, 'ByRows', true) [rows cols] = size(T); for i =1:rows assert(ismembertol(T(i,:),T_correct,.2,'ByRows',true)); end

T = Columns 1 through 17 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 20.0000 28.4772 35.1579 40.5179 44.8926 48.5211 51.5762 54.1838 56.4375 58.4071 60.1460 61.6949 63.0856 64.3431 65.4874 66.5344 67.4973 20.0000 20.0000 20.8983 22.3201 24.0280 25.8726 27.7607 29.6354 31.4629 33.2239 34.9089 36.5138 38.0384 39.4848 40.8559 42.1556 43.3879 20.0000 20.0000 20.0561 20.2398 20.5707 21.0425 21.6372 22.3328 23.1075 23.9414 24.8173 25.7209 26.6402 27.5657 28.4898 29.4063 30.3106 20.0000 20.5298 20.9474 21.2824 21.5658 21.8243 22.0780 22.3409 22.6218 22.9253 23.2528 23.6037 23.9760 24.3669 24.7729 25.1908 25.6173 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 Columns 18 through 34 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 100.0000 68.3867 69.2115 69.9791 70.6957 71.3666 71.9963 72.5887 73.1472 73.6746 74.1735 74.6463 75.0947 75.5206 75.9256 76.3111 76.6782 77.0283 44.5569 45.6666 46.7206 47.7226 48.6758 49.5832 50.4477 51.2717 52.0578 52.8081 53.5245 54.2090 54.8632 55.4887 56.0871 56.6596 57.2077 31.1990 32.0688 32.9179 33.7447 34.5484 35.3281 36.0835 36.8145 37.5211 38.2035 38.8621 39.4971 40.1091 40.6987 41.2663 41.8126 42.3382 26.0492 26.4837 26.9183 27.3508 27.7792 28.2020 28.6178 29.0256 29.4244 29.8135 30.1925 30.5609 30.9186 31.2653 31.6010 31.9257 32.2395 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 25.0000 Columns 35 through 36 100.0000 100.0000 77.3622 85.0000 57.7323 70.0000 42.8437 55.0000 32.5425 40.0000 25.0000 25.0000

Suggested Problems

More from this Author1

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!