Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

problems with interpolation function

Please login with a confirmed email address before reporting spam

I'm using measured data on rain events with 15,000 entries. I'm now trying to implement the data into comsol as a function of time. I have found that using the interpolation function works when using less than 300-500 data entries. When Using more than 500 (all settings equal) the data looks corrupt when plotting the function.

I have attached a .jpg showing the first 200 hours of the interpolation. The first one is using 200 entries and the other one is using the whole dataset (15000 entries). Any idea why they differ?

Jonas


3 Replies Last Post 12 feb 2014, 12:11 GMT-5
Phillip COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12 feb 2014, 10:54 GMT-5
Hi Jonas,

maybe it is just a visualization problem – have you compared certain values from both interpolation functions, e.g. int1(185) and int2(185)? If they match, you do not have to worry about the different appearances of the plots…


--
Best Regards
Phillip
Hi Jonas, maybe it is just a visualization problem – have you compared certain values from both interpolation functions, e.g. int1(185) and int2(185)? If they match, you do not have to worry about the different appearances of the plots… -- Best Regards Phillip

Gunnar Andersson COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12 feb 2014, 11:05 GMT-5
The preview plot of a 1D function by default samples the function in 1000 points. If you want to sample it in more points, do as follows:

1. Click on Create Plot instead of Plot in the function's toolbar.
2. Expand Results > Data Sets: Four data sets have been created. Select the first data set and expand the Resolution section - this is where you can control the number of sample points.
3. Select the plot group that was created when you clicked on Create Plot. The plot will be updated to use the changed number of sample points.

The preview plot of a 1D function by default samples the function in 1000 points. If you want to sample it in more points, do as follows: 1. Click on Create Plot instead of Plot in the function's toolbar. 2. Expand Results > Data Sets: Four data sets have been created. Select the first data set and expand the Resolution section - this is where you can control the number of sample points. 3. Select the plot group that was created when you clicked on Create Plot. The plot will be updated to use the changed number of sample points.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12 feb 2014, 12:11 GMT-5
Thank you both very much. I spent way too long trying to solve this non-existing problem.

Best regards,

Jonas
Thank you both very much. I spent way too long trying to solve this non-existing problem. Best regards, Jonas

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.