Matrices must agree error
Mostrar comentarios más antiguos
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 comentarios
Matt J
el 5 de Dic. de 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
el 5 de Dic. de 2020
Walter Roberson
el 5 de Dic. de 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.
Respuestas (0)
Categorías
Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!