• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Curve Fitting and Netbeans

 
Sam Thompson
Ranch Hand
Posts: 93
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone:

I was just wondering...

Say for example that you have generated some data and would like to write up or develop a program using curve fitting so that it will generate a curve (or any other type of graph in general) or equation that best fits this set of data points?

Does anyone have any suggestions/ideas/clues as to how I can go about this? Also, I am using NetBeans for writing my code. If I need extra classes, packages or extra Java files to complete this task, how do I get NetBeans to implement these extra materials?

Thanks for your help.

S.T.
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There must be any number of Java libraries that perform curve fitting, like Apache Commons Math (#12.6) and this library.
 
Luigi Plinge
Ranch Hand
Posts: 441
IntelliJ IDE Scala Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In your NetBeans project, right-click on Libraries, then "Add Library" or "Add Jar/Folder" as appropriate.
 
Sam Thompson
Ranch Hand
Posts: 93
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks everyone...

I added the Curve fitting library like you said, but how do I tell the programming- the code- to use specific classes or objects or methods from that library I have just added?

What do I "import" exactly in the beginning of the code?

Thanks again

S.T.
 
Luigi Plinge
Ranch Hand
Posts: 441
IntelliJ IDE Scala Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you look at the jar in the Libraries section of the project tree, you will see the packages and classes that it contains. Which of those you import is up to you! I assume you know how import classes - if not, you need a beginners' book on Java.

Also Netbeans has autocomplete, so if you just start typing the name of the class you want to use in your code, it should come up in the list. When you select it, it will automatically import that class for you.
 
Sam Thompson
Ranch Hand
Posts: 93
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried that and all it says Java package does not exist.

I do know how to import. It was placed in the libraries like someone mentioned to me earlier but it still doesn't seem to recognize that another library is being referred to.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic