Skip to content

Function 'nanmean' (input argument of type 'single') is undefined. #4

Closed

Description

@takeyamayuki

Hi, thank you for the great project.

I followed the README for EventPointPose and while running Generate_DHP19_pointcloud_all_mean.m I got the following error.

Function 'nanmean' (input argument of type 'single') is undefined.

Error: GetPoseLabels (line 4)
    pose(1,:) = nanmean(XYZPOS.XYZPOS.head(last_k:k,:),1);

Error: Generate_DHP19_pointcloud_all_mean (line 260)
                    pose = GetPoseLabels(XYZPOS, last_k, k, is_MeanLabel);

4       pose(1,:) = nanmean(XYZPOS.XYZPOS.head(last_k:k,:),1);

my environment: Windows 11, MATLAB R2022a

How should I deal with this issue?
Thank you in advance.

Activity

  1. bestchen97 commented on Oct 31, 2022

    @bestchen97
    Collaborator

    Hi, thank you for the interest.

    I guess it might be caused by the version of MATLAB. You could try to change all nanmean function with mean following this doc, such as pose(1,:) = mean(XYZPOS.XYZPOS.head(last_k:k,:),1,'omitnan');

    Let me know whether it could help you with this error.

  2. takeyamayuki commented on Nov 1, 2022

    @takeyamayuki
    Author

    Thank you for your prompt response.
    I made the edits as suggested and it worked fine.

    I have sent a pull request with the suggested changes and a fix for an error that the models file was not being read when running python evaluate/evaluate.py to evaluate it.

    I would appreciate it if you could merge them if you like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions