The Duke of Edinburgh said it was "a great pleasure to be back in circulation again" as he waved to the gathered crowds in the Scottish capital today.
He then left to join the Queen at their summer retreat of Balmoral Castle in Aberdeenshire.
The Royal Society of Edinburgh is Scotland's national academy of science and letters, and was established in 1783.
Prince Philip has been an honorary fellow since 1951 and has presented Royal Medals eight times since 2001.
More From This Section
When referring to the winners the duke joked: "I wish to God I could understand what they'd been doing!".
The Duke spent 11 nights in hospital in June following a pre-arranged exploratory surgery.
His appearance followed a two-month period of convalescence.
He is yet to meet his great-grandson Prince George born last month and will be introduced to the newest royal when Prince William and wife Kate visit Balmoral for their first family holiday in the next few weeks.