Help me get this matlab right and plot it using matlab Pump= [1:1:100]; P=zeros(
ID: 3599957 • Letter: H
Question
Help me get this matlab right and plot it using matlab
Pump= [1:1:100];
P=zeros(length(Pump),1);
P(1)=20.5;
for varn=2:100
P(varn)=(((14.7*28.5)+(P(varn-1)*63.54))/(65.9))
end
It is working but not showing right numbers.
I wanna know how to plot these answers.
for example.
The answers for P(1)=20.5 is 29 so I need to plot X=1 Y- 20.5 when x =2 Y = 29. I will attach a grapgh I made using excel.
I get these answers form excel while I get different number from matlab
1 25.15903 2 29.65121 3 33.98252 4 38.15871 5 42.18535 6 46.06779 7 49.81119 8 53.42053 9 56.90061 10 60.25607 11 63.49136 12 66.61079 13 69.6185 14 72.51851 15 75.31466 16 78.01068 17 80.61014 18 83.11652 19 85.53313 20 87.86321 21 90.10983 22 92.27601 23 94.36461 24 96.37841 25 98.32009 26 100.1922 27 101.9973 28 103.7378 29 105.4159 30 107.034 31 108.5941 32 110.0983 33 111.5486 34 112.947 35 114.2954 36 115.5954 37 116.8489 38 118.0575 39 119.2228 40 120.3464 41 121.4297 42 122.4743 43 123.4814 44 124.4525 45 125.3888 46 126.2916 47 127.162 48 128.0013 49 128.8105 50 129.5907 51 130.343 52 131.0684 53 131.7677 54 132.4421 55 133.0922 56 133.7191 57 134.3236 58 134.9064 59 135.4683 60 136.0101 61 136.5325 62 137.0362 63 137.5218 64 137.9901 65 138.4416 66 138.8769 67 139.2967 68 139.7014 69 140.0916 70 140.4678 71 140.8306 72 141.1803 73 141.5176 74 141.8427 75 142.1563 76 142.4586 77 142.75 78 143.0311 79 143.302 80 143.5633 81 143.8152 82 144.0581 83 144.2923 84 144.5181 85 144.7358 86 144.9457 88 145.1481 89 145.3433 90 145.5314 91 145.7128 92 145.8878 93 146.0564 94 146.2191 95 146.3759 96 146.527 97 146.6728 98 146.8134 99 146.9489 100 147.0795 Chart Title 160 140 TiHi 80 60 40 20 20 40 80 TiHi 10Explanation / Answer
zeros will not work
Try this
Pump= [1:1:100];
p = [1:1:101];
P(1)=20.5;
for varn=2:100
P(varn)=(((14.7*28.5)+(P(varn-1)*63.54))/(65.9))
plot(varn,p(varn))
end
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.