Respuesta aceptada

Pari
Pari el 17 de Jul. de 2019

0 votos

Thanks dear friends My problem solved with index :)

Más respuestas (2)

infinity
infinity el 17 de Jul. de 2019

1 voto

Hello,
You can simply type
F = rand(3)
M = rand(3)
result = F(F<M)

4 comentarios

Pari
Pari el 17 de Jul. de 2019
Thank you Actually i should select numbers with this condition and put them in a function! I test your answer but i didnot get my result
infinity
infinity el 17 de Jul. de 2019
Hello,
To solve your actual problem, you should provide more description of it.
Pari
Pari el 17 de Jul. de 2019
My code: F=rand(1,400); M=rand(1,400); Tf=log(-F)/.73; Tm=log(-M)/1.2; I should select Tm<Tf and sum these numbers for A= sum(Tm)/sum(Tf)
infinity
infinity el 17 de Jul. de 2019
Hello,
What do you mean when compare Tm and Tf when each element of them are complex number?
Assume when we obtain element of Tm that smaller than Tf, what do you mean by
"sum these numbers for A= sum(Tm)/sum(Tf)" ?

Iniciar sesión para comentar.

Jan
Jan el 17 de Jul. de 2019

1 voto

F = rand(1,400);
M = rand(1,400);
Tf = log(-F) / 0.73;
Tm = log(-M) / 1.2;
It is hard to guess, what this means: "I should select Tm<Tf and sum these numbers for A= sum(Tm)/sum(Tf)". Perhaps:
index = (Tm < Tf);
A = sum(Tm(index)) / sum(Tf(index))

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 17 de Jul. de 2019

Respondida:

el 17 de Jul. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by