Multiplication of 2 sets to get all possible outcomes
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Assiya Syzdykova
el 22 de En. de 2021
Respondida: James Tursa
el 22 de En. de 2021
Hello everyone!
I've been wondering how can I have all posible multiplication outcomes of 2 sets of numbers:
a = 0:0.01:0.2;
b = 0:pi/12:pi;
I want to know all 273 possible multiplications between a and b:
a*sin(b)
Does anyone have an idea how to make it?
0 comentarios
Respuesta aceptada
David Hill
el 22 de En. de 2021
Editada: David Hill
el 22 de En. de 2021
a = 0:0.01:0.2;
b = 0:pi/12:pi;
[A,B]=meshgrid(a,sin(b));
C=A.*B;
c=unique(C(:)');%if you only want unique outcomes.
0 comentarios
Más respuestas (1)
Ver también
Categorías
Más información sobre Resizing and Reshaping Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!