From a488d352e38dadd3c16ab391ac0cc86e0ff3cd2c Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Fri, 21 Jun 2013 13:19:30 +0200 Subject: [PATCH] nf2ff: do check data ranges regardless if new or read only Signed-off-by: Thorsten Liebig --- matlab/CalcNF2FF.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/matlab/CalcNF2FF.m b/matlab/CalcNF2FF.m index 17212ea..b4123d0 100644 --- a/matlab/CalcNF2FF.m +++ b/matlab/CalcNF2FF.m @@ -118,6 +118,11 @@ end nf2ff = ReadNF2FF(nf2ff); +% verify read data +if ( (vectorEqual(nf2ff.freq,freq)==0) || (vectorEqual(nf2ff.theta,theta)==0) || (vectorEqual(nf2ff.phi,phi)==0) ) + error('openEMS:CalcNF2FF','data mismatch between read and requested data --> THIS SHOULD NOT HAPPEN!'); +end + function equal = vectorEqual(v1, v2, acc) if (nargin<3) acc = 1e-6;