function out=peak_analysis(integration,p,paths) rows=[];names=strings(0);summary=struct([]); for i=1:numel(integration.branches) b=integration.branches(i);pr=b.prop;pts=pr.bench_points;massgrid=linspace(4*min([pts.thrust_g])/1000,4*max([pts.thrust_g])/1000,3000); pp=arrayfun(@(m)r23.propulsion_power(m,0,0,1,pr,p),massgrid); bus=pp+b.bus_fixed_load_W+(pp/50).^2*.013; feasible=(pp<=4*b.motor_continuous_each_budget_W)&(bus<=2280); if any(feasible),mc=max(massgrid(feasible));else,mc=NaN;end c=r23.mission_settings(b,p);peakAvail=2280+42*60-b.bus_fixed_load_W; per=min(peakAvail/4,c.peak_motor_each_W); thrust=interp1([pts.electrical_power_W],[pts.thrust_g],per,'linear',NaN); mpeak=4*thrust/1000/c.takeoff_thrust_factor; mtow=min(mc,mpeak); s=struct('design_id',b.design_id,'fixed_hardware_continuous_MTOW_power_screen_kg',mc, ... 'peak_10s_liftoff_MTOW_power_screen_kg',mpeak,'combined_power_screen_MTOW_kg',mtow, ... 'full_H2_and_buffer_no_extra_payload_mass_kg',b.m0_no_extra_payload_kg, ... 'extra_payload_power_margin_kg',mtow-b.m0_no_extra_payload_kg,'structure_and_CG_qualified',false, ... 'warning','Power-screen MTOW only; actual structure/thermal/current/geometry qualification unresolved'); if isempty(summary),summary=s;else,summary(end+1)=s;end for m0=linspace(5,30,251) available=mtow;margin=max(mtow-m0,0); if m0>mtow||m0