dim____

45 Reputation

4 Badges

4 years, 11 days

MaplePrimes Activity


These are questions asked by dim____

 

Why the least square of my calculation is different from the library. Where I am wrong? And how to plot this graph without the library? just use the function mentioned in the content

I think I am doing this question right. Is there anything to improve the code? 

How can I get exactly graph plotting as the sample show? All blue area under the curve. 

 


 

" ref: https://www*maplesoft*com/applications/view*aspx"?SID=153480&view=html"  Data :=  [ [0,0.0,0.0],      [5,0.2,0.1],      [10,0.25,0.2],      [18,0.3,0.3],      [25,0.4,0.4],      [32,0.6,0.45],      [38,0.72,0.50],      [43,0.6,0.40],      [47,0.3,0.30],      [50,0.0,0.0] ]: xdata := [0,5,10,18,25,32,38,43,47,50];  ddata := [0.0,0.2,0.25,0.3,0.4,0.6,0.72,0.6,0.3,0.0];  vdata := [0.0,0.1,0.2,0.3,0.4,0.45,0.5,0.4,0.3,0.0];  "

[0, 5, 10, 18, 25, 32, 38, 43, 47, 50]

 

[0., .2, .25, .3, .4, .6, .72, .6, .3, 0.]

 

[0., .1, .2, .3, .4, .45, .5, .4, .3, 0.]

(1)

with(plots); with(plottools); n := nops(xdata)-2; riverbed := plot([seq([xdata[i], -ddata[i]], i = 1 .. n+2)], style = line, color = blue); readings := seq(plot([[xdata[i], 0], [xdata[i], -ddata[i]]], style = line), i = 1 .. n+2); for i to n do x := xdata[i+1]; d := ddata[i+1]; v := vdata[i+1]; s := sprintf("%4.2f m/s", v); xplot[i] := textplot([x, 0, cat("x", i)], align = above); vplot[i] := textplot([x, -d-0.5e-1, s], font = [HELVETICA, 14]) end do; xtickmarks := seq(xplot[i], i = 1 .. n); velocities := seq(vplot[i], i = 1 .. n); display([readings, riverbed, velocities, xtickmarks], view = [0 .. 51, -1 .. 0], labels = ["river cross section x (m)", "depth (m)"]); n := nops(xdata); for i from 2 to n-1 do x := xdata[i]; d := ddata[i]; xL := xdata[i-1]; xR := xdata[i+1]; poly[i] := polygon([[(xL+x)*(1/2), 0], [(xL+x)*(1/2), -d], [(xR+x)*(1/2), -d], [(xR+x)*(1/2), 0]], color = cyan) end do; polys := seq(poly[i], i = 2 .. n-1); plots[display]([readings, riverbed, polys, velocities, xtickmarks], view = [0 .. 51, -1 .. 0], labels = ["river cross section x (m)", "depth (m)"])

``


 

Download Untitled.mw

Not sure part A is done correctly. flow (m^3 / s) = Area (M^2) * velocity (m/s)

And have no idea how to do part B in maple

Thank you!

How to solve the system equation with Matrix? Basically is part (b)

And not quite familiar with Matrix multiplication in maple? How to do part(c)?

Thank you!!!!

1 2 3 4 Page 3 of 4