Azzera filtri
Azzera filtri

Illegal use of reserved keyword "else".

2 visualizzazioni (ultimi 30 giorni)
Ujjal Dey
Ujjal Dey il 25 Ago 2016
Risposto: Guillaume il 25 Ago 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

Risposte (1)

Guillaume
Guillaume il 25 Ago 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.

Categorie

Scopri di più su Cartesian Coordinate System Conversion in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by