solving an equation for a variable that has changing varibles in it

2 Ansichten (letzte 30 Tage)
joshua payne
joshua payne am 9 Okt. 2022
Kommentiert: Ghazwan am 9 Okt. 2022
im trying to solve for M1 based off a changing Pr
index1=1:304;
index2=697:1000;
index3=305:696;
figure
plot(t(index1),M(index1), 'b')
hold on
plot(t(index2),M(index2), 'b')
%plot(t(index3),M(index3), 'r')
M2=(((M1).^(2))+(2/(gamma-1)))./((((2*gamma)/(gamma-1)).*(M1).^2)-1)
pr=Po(index3)./P(index3)
eqn=((1+((gamma-1)/2).*(M2).^2)).^(gamma/(gamma-1)).*(((gamma+1).*(M1).^2)./(2+(gamma-1).*(M1).^2))==pr
superM=vpasolve(eqn,M, 'real')
plot(t(index3),superM, 'r')
im trying to get only real vaules for M1
  8 Kommentare
joshua payne
joshua payne am 9 Okt. 2022
clc
clear all
t=[0.00
1.20
2.40
3.60
4.80
6.01
7.21
8.41
9.61
10.81
12.01
13.21
14.41
15.62
16.82
18.02
19.22
20.42
21.62
22.82
24.02
25.23
26.43
27.63
28.83
30.03
31.23
32.43
33.63
34.83
36.04
37.24
38.44
39.64
40.84
42.04
43.24
44.44
45.65
46.85
48.05
49.25
50.45
51.65
52.85
54.05
55.26
56.46
57.66
58.86
60.06
61.26
62.46
63.66
64.86
66.07
67.27
68.47
69.67
70.87
72.07
73.27
74.47
75.68
76.88
78.08
79.28
80.48
81.68
82.88
84.08
85.29
86.49
87.69
88.89
90.09
91.29
92.49
93.69
94.89
96.10
97.30
98.50
99.70
100.90
102.10
103.30
104.50
105.71
106.91
108.11
109.31
110.51
111.71
112.91
114.11
115.32
116.52
117.72
118.92
120.12
121.32
122.52
123.72
124.92
126.13
127.33
128.53
129.73
130.93
132.13
133.33
134.53
135.74
136.94
138.14
139.34
140.54
141.74
142.94
144.14
145.35
146.55
147.75
148.95
150.15
151.35
152.55
153.75
154.95
156.16
157.36
158.56
159.76
160.96
162.16
163.36
164.56
165.77
166.97
168.17
169.37
170.57
171.77
172.97
174.17
175.38
176.58
177.78
178.98
180.18
181.38
182.58
183.78
184.98
186.19
187.39
188.59
189.79
190.99
192.19
193.39
194.59
195.80
197.00
198.20
199.40
200.60
201.80
203.00
204.20
205.41
206.61
207.81
209.01
210.21
211.41
212.61
213.81
215.02
216.22
217.42
218.62
219.82
221.02
222.22
223.42
224.62
225.83
227.03
228.23
229.43
230.63
231.83
233.03
234.23
235.44
236.64
237.84
239.04
240.24
241.44
242.64
243.84
245.05
246.25
247.45
248.65
249.85
251.05
252.25
253.45
254.65
255.86
257.06
258.26
259.46
260.66
261.86
263.06
264.26
265.47
266.67
267.87
269.07
270.27
271.47
272.67
273.87
275.08
276.28
277.48
278.68
279.88
281.08
282.28
283.48
284.68
285.89
287.09
288.29
289.49
290.69
291.89
293.09
294.29
295.50
296.70
297.90
299.10
300.30
301.50
302.70
303.90
305.11
306.31
307.51
308.71
309.91
311.11
312.31
313.51
314.71
315.92
317.12
318.32
319.52
320.72
321.92
323.12
324.32
325.53
326.73
327.93
329.13
330.33
331.53
332.73
333.93
335.14
336.34
337.54
338.74
339.94
341.14
342.34
343.54
344.74
345.95
347.15
348.35
349.55
350.75
351.95
353.15
354.35
355.56
356.76
357.96
359.16
360.36
361.56
362.76
363.96
365.17
366.37
367.57
368.77
369.97
371.17
372.37
373.57
374.77
375.98
377.18
378.38
379.58
380.78
381.98
383.18
384.38
385.59
386.79
387.99
389.19
390.39
391.59
392.79
393.99
395.20
396.40
397.60
398.80
400.00
401.20
402.40
403.60
404.80
406.01
407.21
408.41
409.61
410.81
412.01
413.21
414.41
415.62
416.82
418.02
419.22
420.42
421.62
422.82
424.02
425.23
426.43
427.63
428.83
430.03
431.23
432.43
433.63
434.83
436.04
437.24
438.44
439.64
440.84
442.04
443.24
444.44
445.65
446.85
448.05
449.25
450.45
451.65
452.85
454.05
455.26
456.46
457.66
458.86
460.06
461.26
462.46
463.66
464.86
466.07
467.27
468.47
469.67
470.87
472.07
473.27
474.47
475.68
476.88
478.08
479.28
480.48
481.68
482.88
484.08
485.29
486.49
487.69
488.89
490.09
491.29
492.49
493.69
494.89
496.10
497.30
498.50
499.70
500.90
502.10
503.30
504.50
505.71
506.91
508.11
509.31
510.51
511.71
512.91
514.11
515.32
516.52
517.72
518.92
520.12
521.32
522.52
523.72
524.92
526.13
527.33
528.53
529.73
530.93
532.13
533.33
534.53
535.74
536.94
538.14
539.34
540.54
541.74
542.94
544.14
545.35
546.55
547.75
548.95
550.15
551.35
552.55
553.75
554.95
556.16
557.36
558.56
559.76
560.96
562.16
563.36
564.56
565.77
566.97
568.17
569.37
570.57
571.77
572.97
574.17
575.38
576.58
577.78
578.98
580.18
581.38
582.58
583.78
584.98
586.19
587.39
588.59
589.79
590.99
592.19
593.39
594.59
595.80
597.00
598.20
599.40
600.60
601.80
603.00
604.20
605.41
606.61
607.81
609.01
610.21
611.41
612.61
613.81
615.02
616.22
617.42
618.62
619.82
621.02
622.22
623.42
624.62
625.83
627.03
628.23
629.43
630.63
631.83
633.03
634.23
635.44
636.64
637.84
639.04
640.24
641.44
642.64
643.84
645.05
646.25
647.45
648.65
649.85
651.05
652.25
653.45
654.65
655.86
657.06
658.26
659.46
660.66
661.86
663.06
664.26
665.47
666.67
667.87
669.07
670.27
671.47
672.67
673.87
675.08
676.28
677.48
678.68
679.88
681.08
682.28
683.48
684.68
685.89
687.09
688.29
689.49
690.69
691.89
693.09
694.29
695.50
696.70
697.90
699.10
700.30
701.50
702.70
703.90
705.11
706.31
707.51
708.71
709.91
711.11
712.31
713.51
714.71
715.92
717.12
718.32
719.52
720.72
721.92
723.12
724.32
725.53
726.73
727.93
729.13
730.33
731.53
732.73
733.93
735.14
736.34
737.54
738.74
739.94
741.14
742.34
743.54
744.74
745.95
747.15
748.35
749.55
750.75
751.95
753.15
754.35
755.56
756.76
757.96
759.16
760.36
761.56
762.76
763.96
765.17
766.37
767.57
768.77
769.97
771.17
772.37
773.57
774.77
775.98
777.18
778.38
779.58
780.78
781.98
783.18
784.38
785.59
786.79
787.99
789.19
790.39
791.59
792.79
793.99
795.20
796.40
797.60
798.80
800.00
801.20
802.40
803.60
804.80
806.01
807.21
808.41
809.61
810.81
812.01
813.21
814.41
815.62
816.82
818.02
819.22
820.42
821.62
822.82
824.02
825.23
826.43
827.63
828.83
830.03
831.23
832.43
833.63
834.83
836.04
837.24
838.44
839.64
840.84
842.04
843.24
844.44
845.65
846.85
848.05
849.25
850.45
851.65
852.85
854.05
855.26
856.46
857.66
858.86
860.06
861.26
862.46
863.66
864.86
866.07
867.27
868.47
869.67
870.87
872.07
873.27
874.47
875.68
876.88
878.08
879.28
880.48
881.68
882.88
884.08
885.29
886.49
887.69
888.89
890.09
891.29
892.49
893.69
894.89
896.10
897.30
898.50
899.70
900.90
902.10
903.30
904.50
905.71
906.91
908.11
909.31
910.51
911.71
912.91
914.11
915.32
916.52
917.72
918.92
920.12
921.32
922.52
923.72
924.92
926.13
927.33
928.53
929.73
930.93
932.13
933.33
934.53
935.74
936.94
938.14
939.34
940.54
941.74
942.94
944.14
945.35
946.55
947.75
948.95
950.15
951.35
952.55
953.75
954.95
956.16
957.36
958.56
959.76
960.96
962.16
963.36
964.56
965.77
966.97
968.17
969.37
970.57
971.77
972.97
974.17
975.38
976.58
977.78
978.98
980.18
981.38
982.58
983.78
984.98
986.19
987.39
988.59
989.79
990.99
992.19
993.39
994.59
995.80
997.00
998.20
999.40
1000.60
1001.80
1003.00
1004.20
1005.41
1006.61
1007.81
1009.01
1010.21
1011.41
1012.61
1013.81
1015.02
1016.22
1017.42
1018.62
1019.82
1021.02
1022.22
1023.42
1024.62
1025.83
1027.03
1028.23
1029.43
1030.63
1031.83
1033.03
1034.23
1035.44
1036.64
1037.84
1039.04
1040.24
1041.44
1042.64
1043.84
1045.05
1046.25
1047.45
1048.65
1049.85
1051.05
1052.25
1053.45
1054.65
1055.86
1057.06
1058.26
1059.46
1060.66
1061.86
1063.06
1064.26
1065.47
1066.67
1067.87
1069.07
1070.27
1071.47
1072.67
1073.87
1075.08
1076.28
1077.48
1078.68
1079.88
1081.08
1082.28
1083.48
1084.68
1085.89
1087.09
1088.29
1089.49
1090.69
1091.89
1093.09
1094.29
1095.50
1096.70
1097.90
1099.10
1100.30
1101.50
1102.70
1103.90
1105.11
1106.31
1107.51
1108.71
1109.91
1111.11
1112.31
1113.51
1114.71
1115.92
1117.12
1118.32
1119.52
1120.72
1121.92
1123.12
1124.32
1125.53
1126.73
1127.93
1129.13
1130.33
1131.53
1132.73
1133.93
1135.14
1136.34
1137.54
1138.74
1139.94
1141.14
1142.34
1143.54
1144.74
1145.95
1147.15
1148.35
1149.55
1150.75
1151.95
1153.15
1154.35
1155.56
1156.76
1157.96
1159.16
1160.36
1161.56
1162.76
1163.96
1165.17
1166.37
1167.57
1168.77
1169.97
1171.17
1172.37
1173.57
1174.77
1175.98
1177.18
1178.38
1179.58
1180.78
1181.98
1183.18
1184.38
1185.59
1186.79
1187.99
1189.19
1190.39
1191.59
1192.79
1193.99
1195.20
1196.40
1197.60
1198.80
1200.00];
P=[101000.00
100821.64
100643.29
100464.93
100286.57
100108.22
99929.86
99751.50
99573.15
99394.79
99216.43
99038.08
98859.72
98681.36
98503.01
98324.65
98146.29
97967.94
97789.58
97611.22
97432.87
97254.51
97076.15
96897.80
96719.44
96541.08
96362.73
96184.37
96006.01
95827.66
95649.30
95470.94
95292.59
95114.23
94935.87
94757.52
94579.16
94400.80
94222.44
94044.09
93865.73
93687.37
93509.02
93330.66
93152.30
92973.95
92795.59
92617.23
92438.88
92260.52
92082.16
91903.81
91725.45
91547.09
91368.74
91190.38
91012.02
90833.67
90655.31
90476.95
90298.60
90120.24
89941.88
89763.53
89585.17
89406.81
89228.46
89050.10
88871.74
88693.39
88515.03
88336.67
88158.32
87979.96
87801.60
87623.25
87444.89
87266.53
87088.18
86909.82
86731.46
86553.11
86374.75
86196.39
86018.04
85839.68
85661.32
85482.97
85304.61
85126.25
84947.90
84769.54
84591.18
84412.83
84234.47
84056.11
83877.76
83699.40
83521.04
83342.69
83164.33
82985.97
82807.62
82629.26
82450.90
82272.55
82094.19
81915.83
81737.47
81559.12
81380.76
81202.40
81024.05
80845.69
80667.33
80488.98
80310.62
80132.26
79953.91
79775.55
79597.19
79418.84
79240.48
79062.12
78883.77
78705.41
78527.05
78348.70
78170.34
77991.98
77813.63
77635.27
77456.91
77278.56
77100.20
76921.84
76743.49
76565.13
76386.77
76208.42
76030.06
75851.70
75673.35
75494.99
75316.63
75138.28
74959.92
74781.56
74603.21
74424.85
74246.49
74068.14
73889.78
73711.42
73533.07
73354.71
73176.35
72998.00
72819.64
72641.28
72462.93
72284.57
72106.21
71927.86
71749.50
71571.14
71392.79
71214.43
71036.07
70857.72
70679.36
70501.00
70322.65
70144.29
69965.93
69787.58
69609.22
69430.86
69252.51
69074.15
68895.79
68717.43
68539.08
68360.72
68182.36
68004.01
67825.65
67647.29
67468.94
67290.58
67112.22
66933.87
66755.51
66577.15
66398.80
66220.44
66042.08
65863.73
65685.37
65507.01
65328.66
65150.30
64971.94
64793.59
64615.23
64436.87
64258.52
64080.16
63901.80
63723.45
63545.09
63366.73
63188.38
63010.02
62831.66
62653.31
62474.95
62296.59
62118.24
61939.88
61761.52
61583.17
61404.81
61226.45
61048.10
60869.74
60691.38
60513.03
60334.67
60156.31
59977.96
59799.60
59621.24
59442.89
59264.53
59086.17
58907.82
58729.46
58551.10
58372.75
58194.39
58016.03
57837.68
57659.32
57480.96
57302.61
57124.25
56945.89
56767.54
56589.18
56410.82
56232.46
56054.11
55875.75
55697.39
55519.04
55340.68
55162.32
54983.97
54805.61
54627.25
54448.90
54270.54
54092.18
53913.83
53735.47
53557.11
53378.76
53200.40
53022.04
52843.69
52665.33
52486.97
52308.62
52130.26
51951.90
51773.55
51595.19
51416.83
51238.48
51060.12
50881.76
50703.41
50525.05
50346.69
50168.34
49989.98
49811.62
49633.27
49454.91
49276.55
49098.20
48919.84
48741.48
48563.13
48384.77
48206.41
48028.06
47849.70
47671.34
47492.99
47314.63
47136.27
46957.92
46779.56
46601.20
46422.85
46244.49
46066.13
45887.78
45709.42
45531.06
45352.71
45174.35
44995.99
44817.64
44639.28
44460.92
44282.57
44104.21
43925.85
43747.49
43569.14
43390.78
43212.42
43034.07
42855.71
42677.35
42499.00
42320.64
42142.28
41963.93
41785.57
41607.21
41428.86
41250.50
41072.14
40893.79
40715.43
40537.07
40358.72
40180.36
40002.00
39823.65
39645.29
39466.93
39288.58
39110.22
38931.86
38753.51
38575.15
38396.79
38218.44
38040.08
37861.72
37683.37
37505.01
37326.65
37148.30
36969.94
36791.58
36613.23
36434.87
36256.51
36078.16
35899.80
35721.44
35543.09
35364.73
35186.37
35008.02
34829.66
34651.30
34472.95
34294.59
34116.23
33937.88
33759.52
33581.16
33402.81
33224.45
33046.09
32867.74
32689.38
32511.02
32332.67
32154.31
31975.95
31797.60
31619.24
31440.88
31262.53
31084.17
30905.81
30727.45
30549.10
30370.74
30192.38
30014.03
29835.67
29657.31
29478.96
29300.60
29122.24
28943.89
28765.53
28587.17
28408.82
28230.46
28052.10
27873.75
27695.39
27517.03
27338.68
27160.32
26981.96
26803.61
26625.25
26446.89
26268.54
26090.18
25911.82
25733.47
25555.11
25376.75
25198.40
25020.04
24841.68
24663.33
24484.97
24306.61
24128.26
23949.90
23771.54
23593.19
23414.83
23236.47
23058.12
22879.76
22701.40
22523.05
22344.69
22166.33
21987.98
21809.62
21631.26
21452.91
21274.55
21096.19
20917.84
20739.48
20561.12
20382.77
20204.41
20026.05
19847.70
19669.34
19490.98
19312.63
19134.27
18955.91
18777.56
18599.20
18420.84
18242.48
18064.13
17885.77
17707.41
17529.06
17350.70
17172.34
16993.99
16815.63
16637.27
16458.92
16280.56
16102.20
15923.85
15745.49
15567.13
15388.78
15210.42
15032.06
14853.71
14675.35
14496.99
14318.64
14140.28
13961.92
13783.57
13605.21
13426.85
13248.50
13070.14
12891.78
12713.43
12535.07
12356.71
12178.36
12000.00
12000.00
12178.36
12356.71
12535.07
12713.43
12891.78
13070.14
13248.50
13426.85
13605.21
13783.57
13961.92
14140.28
14318.64
14496.99
14675.35
14853.71
15032.06
15210.42
15388.78
15567.13
15745.49
15923.85
16102.20
16280.56
16458.92
16637.27
16815.63
16993.99
17172.34
17350.70
17529.06
17707.41
17885.77
18064.13
18242.48
18420.84
18599.20
18777.56
18955.91
19134.27
19312.63
19490.98
19669.34
19847.70
20026.05
20204.41
20382.77
20561.12
20739.48
20917.84
21096.19
21274.55
21452.91
21631.26
21809.62
21987.98
22166.33
22344.69
22523.05
22701.40
22879.76
23058.12
23236.47
23414.83
23593.19
23771.54
23949.90
24128.26
24306.61
24484.97
24663.33
24841.68
25020.04
25198.40
25376.75
25555.11
25733.47
25911.82
26090.18
26268.54
26446.89
26625.25
26803.61
26981.96
27160.32
27338.68
27517.03
27695.39
27873.75
28052.10
28230.46
28408.82
28587.17
28765.53
28943.89
29122.24
29300.60
29478.96
29657.31
29835.67
30014.03
30192.38
30370.74
30549.10
30727.45
30905.81
31084.17
31262.53
31440.88
31619.24
31797.60
31975.95
32154.31
32332.67
32511.02
32689.38
32867.74
33046.09
33224.45
33402.81
33581.16
33759.52
33937.88
34116.23
34294.59
34472.95
34651.30
34829.66
35008.02
35186.37
35364.73
35543.09
35721.44
35899.80
36078.16
36256.51
36434.87
36613.23
36791.58
36969.94
37148.30
37326.65
37505.01
37683.37
37861.72
38040.08
38218.44
38396.79
38575.15
38753.51
38931.86
39110.22
39288.58
39466.93
39645.29
39823.65
40002.00
40180.36
40358.72
40537.07
40715.43
40893.79
41072.14
41250.50
41428.86
41607.21
41785.57
41963.93
42142.28
42320.64
42499.00
42677.35
42855.71
43034.07
43212.42
43390.78
43569.14
43747.49
43925.85
44104.21
44282.57
44460.92
44639.28
44817.64
44995.99
45174.35
45352.71
45531.06
45709.42
45887.78
46066.13
46244.49
46422.85
46601.20
46779.56
46957.92
47136.27
47314.63
47492.99
47671.34
47849.70
48028.06
48206.41
48384.77
48563.13
48741.48
48919.84
49098.20
49276.55
49454.91
49633.27
49811.62
49989.98
50168.34
50346.69
50525.05
50703.41
50881.76
51060.12
51238.48
51416.83
51595.19
51773.55
51951.90
52130.26
52308.62
52486.97
52665.33
52843.69
53022.04
53200.40
53378.76
53557.11
53735.47
53913.83
54092.18
54270.54
54448.90
54627.25
54805.61
54983.97
55162.32
55340.68
55519.04
55697.39
55875.75
56054.11
56232.46
56410.82
56589.18
56767.54
56945.89
57124.25
57302.61
57480.96
57659.32
57837.68
58016.03
58194.39
58372.75
58551.10
58729.46
58907.82
59086.17
59264.53
59442.89
59621.24
59799.60
59977.96
60156.31
60334.67
60513.03
60691.38
60869.74
61048.10
61226.45
61404.81
61583.17
61761.52
61939.88
62118.24
62296.59
62474.95
62653.31
62831.66
63010.02
63188.38
63366.73
63545.09
63723.45
63901.80
64080.16
64258.52
64436.87
64615.23
64793.59
64971.94
65150.30
65328.66
65507.01
65685.37
65863.73
66042.08
66220.44
66398.80
66577.15
66755.51
66933.87
67112.22
67290.58
67468.94
67647.29
67825.65
68004.01
68182.36
68360.72
68539.08
68717.43
68895.79
69074.15
69252.51
69430.86
69609.22
69787.58
69965.93
70144.29
70322.65
70501.00
70679.36
70857.72
71036.07
71214.43
71392.79
71571.14
71749.50
71927.86
72106.21
72284.57
72462.93
72641.28
72819.64
72998.00
73176.35
73354.71
73533.07
73711.42
73889.78
74068.14
74246.49
74424.85
74603.21
74781.56
74959.92
75138.28
75316.63
75494.99
75673.35
75851.70
76030.06
76208.42
76386.77
76565.13
76743.49
76921.84
77100.20
77278.56
77456.91
77635.27
77813.63
77991.98
78170.34
78348.70
78527.05
78705.41
78883.77
79062.12
79240.48
79418.84
79597.19
79775.55
79953.91
80132.26
80310.62
80488.98
80667.33
80845.69
81024.05
81202.40
81380.76
81559.12
81737.47
81915.83
82094.19
82272.55
82450.90
82629.26
82807.62
82985.97
83164.33
83342.69
83521.04
83699.40
83877.76
84056.11
84234.47
84412.83
84591.18
84769.54
84947.90
85126.25
85304.61
85482.97
85661.32
85839.68
86018.04
86196.39
86374.75
86553.11
86731.46
86909.82
87088.18
87266.53
87444.89
87623.25
87801.60
87979.96
88158.32
88336.67
88515.03
88693.39
88871.74
89050.10
89228.46
89406.81
89585.17
89763.53
89941.88
90120.24
90298.60
90476.95
90655.31
90833.67
91012.02
91190.38
91368.74
91547.09
91725.45
91903.81
92082.16
92260.52
92438.88
92617.23
92795.59
92973.95
93152.30
93330.66
93509.02
93687.37
93865.73
94044.09
94222.44
94400.80
94579.16
94757.52
94935.87
95114.23
95292.59
95470.94
95649.30
95827.66
96006.01
96184.37
96362.73
96541.08
96719.44
96897.80
97076.15
97254.51
97432.87
97611.22
97789.58
97967.94
98146.29
98324.65
98503.01
98681.36
98859.72
99038.08
99216.43
99394.79
99573.15
99751.50
99929.86
100108.22
100286.57
100464.93
100643.29
100821.64
101000.00];
Po=[101034.72
100857.57
100680.46
100503.40
100326.37
100149.39
99972.45
99795.56
99618.71
99441.91
99265.16
99088.47
98911.82
98735.23
98558.70
98382.22
98205.80
98029.44
97853.15
97676.91
97500.75
97324.65
97148.62
96972.67
96796.78
96620.98
96445.25
96269.60
96094.03
95918.55
95743.15
95567.85
95392.63
95217.51
95042.48
94867.56
94692.74
94518.02
94343.41
94168.91
93994.52
93820.25
93646.09
93472.07
93298.16
93124.39
92950.74
92777.24
92603.87
92430.64
92257.56
92084.63
91911.86
91739.24
91566.79
91394.50
91222.38
91050.43
90878.67
90707.08
90535.69
90364.48
90193.48
90022.67
89852.07
89681.69
89511.52
89341.57
89171.85
89002.36
88833.11
88664.10
88495.35
88326.85
88158.61
87990.63
87822.94
87655.52
87488.39
87321.55
87155.01
86988.77
86822.86
86657.26
86491.99
86327.05
86162.46
85998.21
85834.33
85670.81
85507.66
85344.90
85182.53
85020.55
84858.99
84697.83
84537.11
84376.81
84216.96
84057.57
83898.63
83740.17
83582.19
83424.69
83267.71
83111.23
82955.27
82799.85
82644.97
82490.64
82336.88
82183.70
82031.11
81879.11
81727.73
81576.97
81426.85
81277.38
81128.56
80980.42
80832.97
80686.22
80540.18
80394.86
80250.29
80106.47
79963.42
79821.14
79679.67
79539.01
79399.17
79260.17
79122.03
78984.76
78848.38
78712.90
78578.34
78444.71
78312.04
78180.33
78049.61
77919.89
77791.19
77663.52
77536.91
77411.37
77286.92
77163.58
77041.36
76920.29
76800.39
76681.66
76564.15
76447.85
76332.79
76219.00
76106.49
75995.28
75885.39
75776.85
75669.67
75563.88
75459.49
75356.54
75255.03
75155.00
75056.47
74959.45
74863.97
74770.06
74677.74
74587.02
74497.94
74410.52
74324.78
74240.74
74158.44
74077.89
73999.13
73922.17
73847.04
73773.77
73702.38
73632.89
73565.35
73499.76
73436.17
73374.58
73315.04
73257.57
73202.20
73148.95
73097.85
73048.93
73002.23
72957.76
72915.55
72875.64
72838.06
72802.83
72769.98
72739.55
72711.56
72686.04
72663.02
72642.54
72624.63
72609.31
72596.62
72586.58
72579.24
72574.62
72572.75
72573.67
72577.40
72583.98
72593.45
72605.83
72621.16
72639.47
72660.80
72685.17
72712.62
72743.19
72776.91
72813.81
72853.92
72897.29
72943.94
72993.91
73047.24
73103.95
73164.08
73227.68
73294.77
73365.38
73439.56
73517.34
73598.75
73683.82
73772.61
73865.13
73961.42
74061.53
74165.48
74273.31
74385.06
74500.76
74620.44
74744.15
74871.92
75003.77
75139.76
75279.91
75424.25
75572.83
75725.67
75882.82
76044.30
76210.15
76380.40
76555.09
76734.25
76917.91
77106.12
77298.89
77496.26
77698.26
77904.93
78116.30
78332.39
78553.24
78778.87
79009.33
79244.63
79484.80
79729.87
79979.87
80234.83
80494.77
80759.72
81029.69
81304.72
81584.83
81870.04
82160.36
82455.83
82756.46
83062.27
83373.27
83689.49
84010.93
84337.62
84669.56
85006.77
85349.25
85697.02
86050.09
86408.45
86772.12
87141.10
87515.39
87894.99
88279.89
88670.10
89065.55
89466.02
89871.26
90281.04
90695.13
91113.30
91535.32
91960.96
92390.02
92822.27
93257.50
93695.50
94136.05
94578.95
95023.99
95470.98
95919.69
96369.95
96821.53
97274.26
97727.93
98182.34
98637.30
99092.62
99548.10
100003.56
100458.80
100913.63
101367.87
101821.32
102273.80
102725.13
103175.11
103623.56
104070.30
104515.14
104957.90
105398.40
105836.45
106271.88
106704.50
107134.13
107560.60
107983.72
108403.32
108819.22
109231.24
109639.20
110042.94
110442.28
110837.04
111227.06
111612.15
111992.15
112366.89
112736.20
113099.91
113457.85
113809.86
114155.78
114495.43
114828.65
115155.30
115475.19
115788.18
116094.11
116392.81
116684.15
116967.95
117244.07
117512.36
117772.68
118024.86
118268.77
118504.27
118731.20
118949.44
119158.83
119359.26
119550.57
119732.64
119905.33
120068.53
120222.10
120365.91
120499.85
120623.80
120737.63
120841.24
120934.51
121017.33
121089.59
121151.19
121202.02
121241.99
121271.00
121288.95
121295.75
121291.32
121275.56
121248.40
121209.75
121159.53
121097.68
121024.12
120938.78
120841.60
120732.51
120611.46
120478.39
120333.24
120175.98
120006.55
119824.92
119631.03
119424.86
119206.37
118975.54
118732.34
118476.75
118208.74
117928.31
117635.44
117330.13
117012.36
116682.14
116339.48
115984.37
115616.83
115236.87
114844.51
114439.77
114022.67
113593.24
113151.52
112697.53
112231.32
111752.92
111262.39
110759.77
110245.12
109718.49
109179.95
108629.55
108067.37
107493.47
106907.93
106310.82
105702.24
105082.25
104450.96
103808.45
103154.82
102490.15
101814.57
101128.17
100431.05
99723.33
99005.13
98276.56
97537.73
96788.79
96029.84
95261.03
94482.47
93694.32
92896.70
92089.76
91273.64
90448.48
89614.45
88771.68
87920.33
87060.56
86192.52
85316.39
84432.31
83540.47
82641.02
81734.14
80819.99
79898.76
78970.62
78035.74
77094.31
76146.51
75192.52
74232.53
73266.72
72295.29
71318.41
70336.29
69349.11
68357.07
67360.36
67360.36
68357.07
69349.11
70336.29
71318.41
72295.29
73266.72
74232.53
75192.52
76146.51
77094.31
78035.74
78970.62
79898.76
80819.99
81734.14
82641.02
83540.47
84432.31
85316.39
86192.52
87060.56
87920.33
88771.68
89614.45
90448.48
91273.64
92089.76
92896.70
93694.32
94482.47
95261.03
96029.84
96788.79
97537.73
98276.56
99005.13
99723.33
100431.05
101128.17
101814.57
102490.15
103154.82
103808.45
104450.96
105082.25
105702.24
106310.82
106907.93
107493.47
108067.37
108629.55
109179.95
109718.49
110245.12
110759.77
111262.39
111752.92
112231.32
112697.53
113151.52
113593.24
114022.67
114439.77
114844.51
115236.87
115616.83
115984.37
116339.48
116682.14
117012.36
117330.13
117635.44
117928.31
118208.74
118476.75
118732.34
118975.54
119206.37
119424.86
119631.03
119824.92
120006.55
120175.98
120333.24
120478.39
120611.46
120732.51
120841.60
120938.78
121024.12
121097.68
121159.53
121209.75
121248.40
121275.56
121291.32
121295.75
121288.95
121271.00
121241.99
121202.02
121151.19
121089.59
121017.33
120934.51
120841.24
120737.63
120623.80
120499.85
120365.91
120222.10
120068.53
119905.33
119732.64
119550.57
119359.26
119158.83
118949.44
118731.20
118504.27
118268.77
118024.86
117772.68
117512.36
117244.07
116967.95
116684.15
116392.81
116094.11
115788.18
115475.19
115155.30
114828.65
114495.43
114155.78
113809.86
113457.85
113099.91
112736.20
112366.89
111992.15
111612.15
111227.06
110837.04
110442.28
110042.94
109639.20
109231.24
108819.22
108403.32
107983.72
107560.60
107134.13
106704.50
106271.88
105836.45
105398.40
104957.90
104515.14
104070.30
103623.56
103175.11
102725.13
102273.80
101821.32
101367.87
100913.63
100458.80
100003.56
99548.10
99092.62
98637.30
98182.34
97727.93
97274.26
96821.53
96369.95
95919.69
95470.98
95023.99
94578.95
94136.05
93695.50
93257.50
92822.27
92390.02
91960.96
91535.32
91113.30
90695.13
90281.04
89871.26
89466.02
89065.55
88670.10
88279.89
87894.99
87515.39
87141.10
86772.12
86408.45
86050.09
85697.02
85349.25
85006.77
84669.56
84337.62
84010.93
83689.49
83373.27
83062.27
82756.46
82455.83
82160.36
81870.04
81584.83
81304.72
81029.69
80759.72
80494.77
80234.83
79979.87
79729.87
79484.80
79244.63
79009.33
78778.87
78553.24
78332.39
78116.30
77904.93
77698.26
77496.26
77298.89
77106.12
76917.91
76734.25
76555.09
76380.40
76210.15
76044.30
75882.82
75725.67
75572.83
75424.25
75279.91
75139.76
75003.77
74871.92
74744.15
74620.44
74500.76
74385.06
74273.31
74165.48
74061.53
73961.42
73865.13
73772.61
73683.82
73598.75
73517.34
73439.56
73365.38
73294.77
73227.68
73164.08
73103.95
73047.24
72993.91
72943.94
72897.29
72853.92
72813.81
72776.91
72743.19
72712.62
72685.17
72660.80
72639.47
72621.16
72605.83
72593.45
72583.98
72577.40
72573.67
72572.75
72574.62
72579.24
72586.58
72596.62
72609.31
72624.63
72642.54
72663.02
72686.04
72711.56
72739.55
72769.98
72802.83
72838.06
72875.64
72915.55
72957.76
73002.23
73048.93
73097.85
73148.95
73202.20
73257.57
73315.04
73374.58
73436.17
73499.76
73565.35
73632.89
73702.38
73773.77
73847.04
73922.17
73999.13
74077.89
74158.44
74240.74
74324.78
74410.52
74497.94
74587.02
74677.74
74770.06
74863.97
74959.45
75056.47
75155.00
75255.03
75356.54
75459.49
75563.88
75669.67
75776.85
75885.39
75995.28
76106.49
76219.00
76332.79
76447.85
76564.15
76681.66
76800.39
76920.29
77041.36
77163.58
77286.92
77411.37
77536.91
77663.52
77791.19
77919.89
78049.61
78180.33
78312.04
78444.71
78578.34
78712.90
78848.38
78984.76
79122.03
79260.17
79399.17
79539.01
79679.67
79821.14
79963.42
80106.47
80250.29
80394.86
80540.18
80686.22
80832.97
80980.42
81128.56
81277.38
81426.85
81576.97
81727.73
81879.11
82031.11
82183.70
82336.88
82490.64
82644.97
82799.85
82955.27
83111.23
83267.71
83424.69
83582.19
83740.17
83898.63
84057.57
84216.96
84376.81
84537.11
84697.83
84858.99
85020.55
85182.53
85344.90
85507.66
85670.81
85834.33
85998.21
86162.46
86327.05
86491.99
86657.26
86822.86
86988.77
87155.01
87321.55
87488.39
87655.52
87822.94
87990.63
88158.61
88326.85
88495.35
88664.10
88833.11
89002.36
89171.85
89341.57
89511.52
89681.69
89852.07
90022.67
90193.48
90364.48
90535.69
90707.08
90878.67
91050.43
91222.38
91394.50
91566.79
91739.24
91911.86
92084.63
92257.56
92430.64
92603.87
92777.24
92950.74
93124.39
93298.16
93472.07
93646.09
93820.25
93994.52
94168.91
94343.41
94518.02
94692.74
94867.56
95042.48
95217.51
95392.63
95567.85
95743.15
95918.55
96094.03
96269.60
96445.25
96620.98
96796.78
96972.67
97148.62
97324.65
97500.75
97676.91
97853.15
98029.44
98205.80
98382.22
98558.70
98735.23
98911.82
99088.47
99265.16
99441.91
99618.71
99795.56
99972.45
100149.39
100326.37
100503.40
100680.46
100857.57
101034.72];
gamma=1.4;
M=((((Po./P).^((gamma-1)./gamma)-1)*2)/(gamma-1)).^(1/2);
Msonic=find(abs(M-1)<.005)
values=M(305)
values=M(696)
Po1=P.*(1+((gamma-1)/2).*M.^2);
M2=(((M.^2)+(2/(gamma-1)))/(((2*gamma)/(gamma-1))-1));
%Po2=
index1=1:304;
index2=697:1000;
index3=305:696;
figure
plot(t(index1),M(index1), 'b')
hold on
plot(t(index2),M(index2), 'b')
%plot(t(index3),M(index3), 'r')
%M2=((((M1).^(2))+(2/(gamma-1)))./((((2*gamma)/(gamma-1)).*(M1).^2)-1))
pr=Po(index3)./P(index3)
syms M1
eqn=((1+((gamma-1)/2).*(((((M1).^(2))+(2/(gamma-1)))./((((2*gamma)/(gamma-1)).*(M1).^2)-1))).^2)).^(gamma/(gamma-1)).*(((gamma+1).*(M1).^2)./(2+(gamma-1).*(M1).^2))==pr
superM=vpasolve(eqn,M1, 'real')
plot(t(index3),superM, 'r')
hold off
Ghazwan
Ghazwan am 9 Okt. 2022
Please, re-post your quesiton after you put the data in an excel spreadsheet as it is diffcult to read it. Thanks!

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by