How to calculate the shear centre of a wing?
I implemented a program using Matlab for S.C calculus purposes (I'm actually involved in an aircraft project and, fortunately (or not), I'm the structures guy. I have based the code and the theory in a PDF bibliography that is linked w/ the .zip folder. You'll notice two matlab codes:
-One is named &quot;Load_Airfoil_Coordinates_using_MATLAB.m&quot;. It loads any .dat file (i.e., if you have your airfoil points, you can plot it using this code);
-Another is named &quot;Matlab_script_for_the_shear_center.m&quot;. It calculates, beyond your airfoil's C.G (Xcg,Ycg), the shear center (Xsc,Ysc) - probably you'll need to change some of the inputs to agree with your problem, specifically. Despite I've commented the most part of this code, I recommend you to follow Perini's theory (PDF bibliography) to understand the steps.
To download the .zip folder, please click my OneDrive link: https://1drv.ms/u/s!Aqqj-vTtH2vbomM9cVTInsHp7dbn?e=PMFudZ.
If you're just focusing on the theory, I recommend you some bibliographic references, such as:

T.H.G. Megson - Introduction to Aircraft Structural Analysis

David J. Peery -  Aircraft Structures

B. K. Donaldson- Analysis of Aircraft Structures
Hope I was helpful.


Best regards,
João Cioffi