nf2ff: do check data ranges regardless if new or read only

Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
pull/10/head
Thorsten Liebig 2013-06-21 13:19:30 +02:00
parent 041339d2a7
commit a488d352e3
1 changed files with 5 additions and 0 deletions

View File

@ -118,6 +118,11 @@ end
nf2ff = ReadNF2FF(nf2ff); 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) function equal = vectorEqual(v1, v2, acc)
if (nargin<3) if (nargin<3)
acc = 1e-6; acc = 1e-6;