Borrar filtros
Borrar filtros

Finding corresponding value of one vector in another vector

1 visualización (últimos 30 días)
Yamana Uno
Yamana Uno el 13 de Nov. de 2023
Respondida: Voss el 13 de Nov. de 2023
Hi, for example if I have vectors A = [0 1 2 3 4 5 6 7 8 9 10] and B = [0 100 200 300 400 500 600 700 800 900 1000]. and am getting asked to find the value of B when A=7, how do I do that?
Thank you!

Respuesta aceptada

Voss
Voss el 13 de Nov. de 2023
A = [0 1 2 3 4 5 6 7 8 9 10];
B = [0 100 200 300 400 500 600 700 800 900 1000];
result = B(A==7)
result = 700

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by