Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in initDecentrState.m line 61 #4

Open
roaddy opened this issue Jul 14, 2018 · 1 comment
Open

error in initDecentrState.m line 61 #4

roaddy opened this issue Jul 14, 2018 · 1 comment

Comments

@roaddy
Copy link

roaddy commented Jul 14, 2018

Matlab report an error when running initDecentrState.m in line 61:

T_O_W(1:3,1:3)*full_state{I}.p_W_lm'+T_O_W(1:3,4);

I think the problem maybe caused by mismatch of matrix dimension to plus, so I replace

T_O_W(1:3,4) with iron(ones(1,size(full_state{I}.p_W_lm,1),1),T_O_W(1:3,4)).

It can pass, but I wonder is this correct?

@tcies tcies self-assigned this Oct 16, 2018
@tcies
Copy link
Contributor

tcies commented Oct 16, 2018

yes, this is due to versions of matlab older than 2016b not supporting broadcasting:
https://blogs.mathworks.com/loren/2016/10/24/matlab-arithmetic-expands-in-r2016b/

I think the vanilla way to fix this is with bsxfun.

Sorry, and sorry for the late reply. If you have this fixed, a pull request would be appreciated!

@tcies tcies removed their assignment Oct 16, 2018
@tcies tcies changed the title Error Report in initDecentrState.m error in initDecentrState.m line 61 Feb 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants