LOS function doesn't properly output the LOS state when it's run in using parpool
9 views (last 30 days)
Show older comments
When I run the los function in a squential manner I got some reasonable results, but when I run the same function using Parallel computing using Processes profile, I got a different results, most of the results is 1's only.
Here is the sequential line..
LOS = los(tx, rx);
here is the parallel line:
los1 = parfeval(@los ,1,tx, rx);
LOS = fetchOutputs(los1);
the results are is is the follwing images:
for sequential output, SEE LOS Columns

for sequential input SEE LOS Columns

5 Comments
Raymond Norris
on 6 Jan 2024
Can you provide more code as to how to run this (specifically how you build up tx and rx)? I don't think I'm doing it right.
>> tx_rx = readmatrix('1.csv.xlsx','NumHeaderLines',1,'ExpectedNumVariables',2,'OutputType','double','FileType','spreadsheet');
>> tx = txsite("Latitude",13.419169,"Longitude",-16.705148,"AntennaHeight",22);
>> rx = rxsite("Latitude",tx_rx(1,1),"Longitude",tx_rx(1,2),"AntennaHeight",22);
>> LOS = los(tx,rx);
>> LOS2 = parfeval(@los,1,tx,rx);
>> LOS
LOS =
logical
1
>> fetchOutputs(LOS2)
ans =
logical
1
>>
>> rx = txsite("Latitude",-89.8248,"Longitude",-0.30577,"AntennaHeight",22);
>> LOS = los(tx,rx);
>> LOS2 = parfeval(@los,1,tx,rx);
>> LOS
LOS =
logical
0
>> fetchOutputs(LOS2)
ans =
logical
0
>>
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!