clear all;
close all;
clc;

fid = fopen('octave_0_1_LHSf.mat');
tline = fgets(fid);
tline = fgets(fid);
tline = fgets(fid);
tline = fgets(fid);
tline = fgets(fid);
tline = fgets(fid);

data = fscanf(fid,'%d %d (%f,%f)\n',[4 inf]);
fclose(fid);
data = data';
dataC(:,1) = data(:,1);
dataC(:,2) = data(:,2);
dataC(:,3) = data(:,3) + 1i*data(:,4);
% octave_0_1_LHSf = spconvert(dataC);
% Must be done this way for Octave.
dataC_real(:,1) = data(:,1);
dataC_real(:,2) = data(:,2);
dataC_real(:,3) = data(:,3);
dataC_imag(:,1) = data(:,1);
dataC_imag(:,2) = data(:,2);
dataC_imag(:,3) = data(:,4);
octave_0_1_LHSf = spconvert(dataC_real) + 1i*spconvert(dataC_imag);
clear data;

fid = fopen('octave_0_1_RHSf.mat');

tline = fgets(fid);
tline = fgets(fid);
tline = fgets(fid);
tline = fgets(fid);
tline = fgets(fid);

data = fscanf(fid,' (%f,%f)\n',[2 inf]);
fclose(fid);
data = data';
octave_0_1_RHSf = data(:,1) + 1i*data(:,2);
%clear data;

Ef_octave = octave_0_1_LHSf \ octave_0_1_RHSf;


