Matrices must agree error

I need help on why it's not solving this problem for me. I trying to solve this problem. A horizontal trough 18 ft long has ends in the shape of an isosceles right triangle (see the figure below). If water is poured into it at the rate of 4.00 ft3/min, at what rate is the surface of the water rising when the water is 5.00 ft deep? It keeps on saying that matrices aren't agreeing. I'm not sure why it's saying that

3 commentaires

Matt J
Matt J le 5 Déc 2020
Please post code in code wells like below, rather than as images. It makes it easier for us to copy and manipulate. Also please copy/paste full error messages into your post, rather than summarizing them in your own words, so that we have all the information.
h=5
v = 1/2*3*h*18
t=linspace(0,5)
4 == diff(v)./diff(t)
Avery Frick
Avery Frick le 5 Déc 2020
I tried that just now and it didn’t work
Walter Roberson
Walter Roberson le 5 Déc 2020
Your v is scalar because your h is scalar. diff() of a scalar is empty. diff(t) is not empty but empty divided by not-empty is empty. So the right hand side is empty, but the left side of the == is not empty and you have a problem.
Reminder: v/t would be a rate and you are comparing the rate to a depth, which does not match.

Connectez-vous pour commenter.

Réponses (0)

Catégories

Community Treasure Hunt

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

Start Hunting!

Translated by