Too many output arguments

Hi, I am writing a matlab code to analyze GNSS satellite track using Rinex data. However, it comes up with error where there are too many arguments. The code is basically coming from the skyplot manual from matlab and it should be fine theoretically. How can I fix this problem in line 553? Thanks.
recPos = [0 0 0];
maskAngle = 10;
filename = "hkkt020e.24n";
data = rinexread(filename);
data.GPS(1:4,:) % Just used for understanding rine file content, basically caln ignore it
[~,satIdx] = unique(data.GPS.SatelliteID);
navmsg = data.GPS(satIdx,:);
startTime = navmsg.Time(1);
secondsPerHour = 3600;
dt = 60; % seconds
numHours = 1;
timeElapsed = 0:dt:(secondsPerHour*numHours);
t = startTime + seconds(timeElapsed);
numSats = numel(navmsg.SatelliteID);
allAz = NaN(numel(t),numSats);
allEl = allAz;
for idx = 1:numel(t)
[satPos,~,satID] = gnssconstellation(t(idx),RINEXData=navmsg);
[az,el,vis] = lookangles(recPos,satPos,maskAngle);
allAz(idx,:) = az;
allEl(idx,:) = el;
end
allEl(allEl < 0) = missing;
figure
sp = skyplot(allAz(1,:),allEl(1,:),satID,MaskElevation=maskAngle);
for idx = 1:size(allAz, 1)
set(sp,AzimuthData=allAz(1:idx,:),ElevationData=allEl(1:idx,:));
drawnow limitrate
end

6 件のコメント

Walter Roberson
Walter Roberson 2024 年 2 月 6 日
That is odd.
What shows up for
which -all skyplot
Yat Chi
Yat Chi 2024 年 2 月 6 日
The following error is shown:
Unrecognized function or variable 'sp'.
Error in RINEX_processing_main_V1_7 (line 556)
set(sp,AzimuthData=allAz(1:idx,:),ElevationData=allEl(1:idx,:));
recPos = [0 0 0];
maskAngle = 10;
filename = "hkkt020e.24n";
data = rinexread(filename);
data.GPS(1:4,:) % Just used for understanding rine file content, basically caln ignore it
[~,satIdx] = unique(data.GPS.SatelliteID);
navmsg = data.GPS(satIdx,:);
startTime = navmsg.Time(1);
secondsPerHour = 3600;
dt = 60; % seconds
numHours = 1;
timeElapsed = 0:dt:(secondsPerHour*numHours);
t = startTime + seconds(timeElapsed);
numSats = numel(navmsg.SatelliteID);
allAz = NaN(numel(t),numSats);
allEl = allAz;
for idx = 1:numel(t)
[satPos,~,satID] = gnssconstellation(t(idx),RINEXData=navmsg);
[az,el,vis] = lookangles(recPos,satPos,maskAngle);
allAz(idx,:) = az;
allEl(idx,:) = el;
end
allEl(allEl < 0) = missing;
figure
which -all skyplot
% sp = skyplot(allAz(1,:),allEl(1,:),satID,MaskElevation=maskAngle);
for idx = 1:size(allAz, 1)
set(sp,AzimuthData=allAz(1:idx,:),ElevationData=allEl(1:idx,:));
drawnow limitrate
end
Walter Roberson
Walter Roberson 2024 年 2 月 6 日
I need to know the output of
which -all skyplot
Yat Chi
Yat Chi 2024 年 2 月 6 日
Nothing happened, only comment shown in the command window
C:\Users\User\Desktop\FYP_Demo_Experiment\FYP_Demo_Experiment\MATLAB_lib_basic\satnav3p01\skyplot.m
C:\Program Files\MATLAB\R2023b\toolbox\shared\mlskyplot\mlskyplot\skyplot.m % Shadowed
Stephen23
Stephen23 2024 年 2 月 6 日
移動済み: Stephen23 2024 年 2 月 7 日
@Yat Chi: rename your SKYPLOT file under DESKTOP/FYP_DEMO_EXPERIMENT to something that is not SKYPLOT (or the name of any other inbuilt function). For example, rename it as MYSKYPLOT.
Yat Chi
Yat Chi 2024 年 2 月 6 日
移動済み: Stephen23 2024 年 2 月 7 日
Finally worked fine, thanks very much for both of your help. You made my day.

サインインしてコメントする。

回答 (0 件)

製品

リリース

R2023b

質問済み:

2024 年 2 月 6 日

移動済み:

2024 年 2 月 7 日

Community Treasure Hunt

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

Start Hunting!

Translated by