4 ms·
First prompt: var G = 6.67e-11; var force = G * mass1 * mass2 / distance * distance; return force; Second prompt: % pointMatrixGravity - Calcul
by jmcphers 4y ago
First prompt:
var G = 6.67e-11;
var force = G * mass1 * mass2 / distance * distance;
return force;
Second prompt:
% pointMatrixGravity - Calculates the gravitational force and torque on a
% point mass due to a matrix of point masses.
%
% [force, torque]=pointMatrixGravity(array1,array2)
%
% Inputs:
% array1 - 3xN array of point masses
% array2 - 3xN array of point masses
% Outputs:
% force - 3x1 array of gravitational force
% torque - 3x1 array of gravitational torque
%
% Author: David J. R. MacKay,
% email:
- ridiculous_fish 4y agoFYI if you use the "Open GitHub Copilot" command in VSCode you will get up to 10 different outputs for the same prompt. Intereting that my results were different than yours!