Effacer les filtres
Effacer les filtres

Illegal use of reserved keyword "else".

2 vues (au cours des 30 derniers jours)
Ujjal Dey
Ujjal Dey le 25 Août 2016
Réponse apportée : Guillaume le 25 Août 2016
if ( found )
[r, pclon, pclat] = cspice_reclat( point );
% Let re, rp, and f be the satellite's longer equatorial
% radius, polar radius, and flattening factor.
re = radii(1);
rp = radii(3);
f = ( re - rp ) / re;
[pdlon, pdlat, alt] = cspice_recgeo( point, re, f );
% Compute illumination angles at the surface point.
[phase, solar, emissn] = cspice_illum( satnm, et, ABCORR, scnm, point );
% Display results. Convert angles from radians to degrees
% for output.
fprintf( 'Intercept planetocentric longitude (deg): %11.6f\n',... R2D*pclon )
fprintf( 'Intercept planetocentric latitude (deg): %11.6f\n',... R2D*pclat )
fprintf( 'Intercept planetodetic longitude (deg): %11.6f\n',... R2D*pdlon )
fprintf( 'Intercept planetodetic latitude (deg): %11.6f\n',... R2D*pdlat )
fprintf( 'Range from spacecraft to intercept point (km): %11.6f\n',... dist )
fprintf( 'Range from spacecraft to target center (km): %11.6f\n',... norm(obspos) )
fprintf( 'Intercept phase angle (deg): %11.6f\n',... R2D*phase )
fprintf( 'Intercept solar incidence angle (deg): %11.6f\n',... R2D*solar )
fprintf( 'Intercept emission angle (deg): %11.6f\n',... R2D*emissn )
else
disp( ['No intercept point found at ' time ] )
end

Réponses (1)

Guillaume
Guillaume le 25 Août 2016
Short answer: get rid of all the ...
Long answer: I assume that at some point, the stuff after the ... was on a second line. ... means two things: the rest of the line is a comment, the remaining of the instruction is on the next line. In effect, what you have written is:
fprintf('something', fprintf('somethingelse', fprintf('anothersomething', else
else is not valid in this context.

Catégories

En savoir plus sur Cartesian Coordinate System Conversion dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by