Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

How can resolve r0<=r0_max?

1 visualización (últimos 30 días)
Alessandro Perna
Alessandro Perna el 5 de Oct. de 2020
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
if r0{mm,nn}(:,1) <= r0_max(mm,nn)
copertura{mm,nn}(:,1) = 1;
else
copertura{mm,nn}(:,1) = 0;
where
r0{mm,nn} = ((SSx{mm,nn}-Px).^2+(SSy{mm,nn}-Py).^2+(SSz{mm,nn}-Pz).^2).^0.5; (cell 181x361 which element are 43x1 or 44x1)
r0_max = (R_E^2-(R_E.*cos(beta0)).^2).^0.5; (matrix 181x361)

Respuestas (1)

Are Mjaavatten
Are Mjaavatten el 12 de Nov. de 2020
I interpret your question to mean that you want copertura{mm,nn}(k,1) to take the value 1 if r0{mm,nn}(k,1) <= r0_max(mm,nn), and 0 otherwise. If so, this should do the trick:
copertura = cell(mm_max,nn_max);
for mm = 1:mm_max
for nn = 1:nn_max
copertura{mm,nn}=double(r0{mm,nn}(:,1) <= r0_max(mm,nn));
end
end

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by