Dadas dos magnitudes (a y b) en forma de vectores, crear una función que permita obtener la razón de proporcionalidad m sólo en aquellos casos en los que exista una relación de proporcionalidad directa entre ambas.
- Ejemplo 1:
a = [1 2 3 4] b = [2 4 6 8]
Relación proporcional de razón m = 2.
- Ejemplo 2:
a = [1 2 3 4] b = [1 6 3 2]
No existe relación de proporcionalidad, por lo que m = 0.
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers35
Suggested Problems
-
Select every other element of a vector
37250 Solvers
-
Remove the small words from a list of words.
1566 Solvers
-
Remove the two elements next to NaN value
713 Solvers
-
138 Solvers
-
Multiply two polynomials p and q given in in vector representation.
73 Solvers
More from this Author4
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!