How to integrate a csv or txt file?

Please login with a confirmed email address before reporting spam

Hello,

I want to use the NREL solar spectrum (https://www.nrel.gov/grid/solar-resource/spectra.html) data in my COMSOL simulations. I am able to import the data into an interpolation table (name is root.int1), however I am not sure how to integrate it. I have tried to do:

integrate(int1,x,lower, upper)

however COMSOL cannot recognize int1 as the interpolation name. Any suggestions would be much appreciate.



1 Reply Last Post 31 mar 2022, 08:43 GMT-4
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 6 months ago 31 mar 2022, 08:43 GMT-4
Updated: 6 months ago 31 mar 2022, 08:44 GMT-4

Hello Gabriel,

If int1 is a function, you call it with the argument x by typing int1(x), not int1.

Best,

Jeff

-------------------
Jeff Hiller
Hello Gabriel, If int1 is a function, you call it with the argument x by typing int1(x), not int1. Best, Jeff

Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.