From c70c822c99a4ab87fd50bc186ce8473b27af6a03 Mon Sep 17 00:00:00 2001 From: Samuel Lazerson Date: Thu, 11 Apr 2024 16:44:48 +0200 Subject: [PATCH] Cleanup of how V-prime calculation is done. --- BEAMS3D/beams3d_volume.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BEAMS3D/beams3d_volume.m b/BEAMS3D/beams3d_volume.m index b59a955..aa64cd8 100644 --- a/BEAMS3D/beams3d_volume.m +++ b/BEAMS3D/beams3d_volume.m @@ -52,8 +52,8 @@ if isempty(ns) ns = double(beam_data.ns_prof1); end -ds = 1./(ns); -edges = 0:ds:1; +edges = linspace(0,1,ns+1); +ds = diff(edges(1:2)); s = 0.5.*(edges(1:end-1)+edges(2:end)); % Create profile