Error at '(' in first line of code
이전 댓글 표시
I am getting several errors on this line of code. The first is a error at '(' between size and 1. The next is at the ')' at the end of the line. Please help me understand what I am missing The input for the moonpos function is (vector of julian days in TDT time scale; output coordinate type). There could be a problem with the input but I am not sure.
function [X,Y,Z]=moonpos(size(1);elpdt)
댓글 수: 4
size(1)
is not valid syntax in a function definition. You should simply have variable names, not indexing into them, and 'size' certainly should not be a variable name.
I've never tried it, but I doubt ; is valid syntax in a function definition either. Arguments are separated by commas.
dpb
2018년 7월 9일
Is this really an attempt to define the function prototype here or an attempt to translate what the prototype is thought to be?
Evan Mossel
2018년 7월 9일
편집: Walter Roberson
2018년 7월 9일
Walter Roberson
2018년 7월 9일
https://www.mathworks.com/matlabcentral/fileexchange/56041-moon-position gives an example of calling moonpos()
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Simulink 3D Animation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!