Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
Exporting from Matlab back to Comsol and plotting in Comsol
Posted 13.11.2018, 14:48 GMT-5 General, LiveLink for MATLAB, Results & Visualization 2 Replies
Please login with a confirmed email address before reporting spam
Hello,
I want to export a variable from Matlab back into Comsol to plot it after some processing has been performed on it.
Initially I exported an electric field distribution (the x,y,z components Ex, Ey, Ez) from Comsol to Matlab. I did some calculations on it, and now want to export it back to Comsol. The original format was a 1-by-n matrix with length n equal to the number of position (x,y) pairs in the mesh (this is how Comsol exports it), and the output is still a 1-by-n matrix.
For argument's sake, let's just pretend I took that original matrix and multiplied it by 2, and now am trying to import it back into Comsol to plot. Thus all values are still in the same order, to be used with the original (x,y) points in the original mesh. If I did this in Comsol, it would obviously just be 2 ewfd.Ex, for example. But I want to do this in Matlab and export to Comsol, because I am doing more than just multiplying by 2.
How do I go about doing that? Thank you for any help you can provide.