0
from MATLAB to Python
please can anyone help me convert this MATLAB code to a Python code? thanks in advance. RexLev_pf = 6; ca_filtered = -82.3826; RexQual_pf = 75; qa_filtered = 22.0392; sfactor = 3; qfactor = 6; Starget = [-110:1:-47]; Qtarget = [22, 18, 16, 14, 12, 9, 6, 4]; for i = 1:64 for j = 1:8 output1(i,j) = (-((RexLev_pf)*(ca_filtered - Starget(i))+ (RexQual_pf)*(qa_filtered - Qtarget(j)))); output2(i,j) = (-((sfactor)*(ca_filtered - Starget(i)) + qfactor*(qa_filtered - Qtarget(j)))); end end
7 Respostas
+ 10
I dont know MATLAB, but I think I got most of the code converted.
one question, what is the Stargent variable supposed to be?
+ 7
ok Khaled Gamal Saad, i updated the code. I think it's what you wanted.
+ 5
ok here you go.
https://code.sololearn.com/cTxJ8th0yva8/?ref=app
It will raise a index error because the Stargent variable is only 53 elements long to the i range is trying to go through it 64 times.
+ 1
thank you LONGTIE👔 :)
0
Starget is the signal strength that the mobile phone should attain, and it lies within the range from -110 dB to -47 dB
0
thank you so much ☺️ and Starget has 64 elements in it, not 53
0
I want the outputs to be in matrices of 8 rows*64 columns