Ansys Learning Forum Forums Discuss Simulation Photonics Updating a Lumerical example Reply To: Updating a Lumerical example

sara.bassil
Subscriber

Thank you so much that helped !!

I am first doing the sweep over the gap to extract the final E matrix (Ef) of dimension (length(datapoints), 3, length(gaps)) 
However the datapoints don't have the same length for each gap 
So I chose to cut the extra values : 
For example if ?size(E) ; = (1450,3) 
I did this : Ef(:,:,i)=E(1:1400,:)
with Ef = matrix(1400,3,length(gaps))

So once I have my final E matrix I do a sweep over the gap to compute the perturbed index. 
However when I want to use the function addattribute I have this following error : matrix for addattribute does not have the correct size to match the dataset 

I think it's because the dimension of my final E matrix is : (1400, 3, length(gaps)) and not (1400, length(gaps), 3) 
Is there a way I can add the attribute to the electrosattics dataset ? 
My next step is to use the FEEM script and modify it as well to obtain the Vpi and the losses in function of the gapÂ