No BSD License  

Highlights from
Calculating blending moment of the shaft

image thumbnail
from Calculating blending moment of the shaft by Riccardo
It calculate blending moment of the shaft when you insert a generic number of forces.

plotta (reazA,reazB,lung,forze)
function plotta (reazA,reazB,lung,forze)
h1=figure;
set(h1,'units','normalized','position',[0.01 0.1 0.4 0.8],'color','y','name','Diagrammi della Sollecitazione');
reazioni=[reazB reazA];

% Disegna l'albero con le forze applicate e le reazioni ai vincoli
% calcolate.
subplot(3,1,1)
    hold on
    albero=line([0 lung], [0 0],'marker','.','Color','black');
    SottoGrafico(reazioni,forze)
    text(0,-abs(reazioni(1)/2),[num2str(reazioni(1)),'KN']);
    text(lung,-abs(reazioni(2)/2),[num2str(reazioni(2)),'KN']);
    
% Disegna il Momento Flettente
subplot(3,1,2)
    hold on    
    albero=line([0 lung], [0 0],'marker','.','Color','black');
    flex(forze,lung,reazioni)

% Disegna il Momento Torcente
subplot(3,1,3)
    hold on    
    albero=line([0 lung], [0 0],'marker','.','Color','black');
    torx

Contact us at files@mathworks.com