Rant: Cubic spline interpolation

imported_vr6

Platinum Member
Jul 6, 2001
2,740
0
0
[Rant]I am not an enginneer. I am not an math major.

So i am interning at this firm and they want me to write a program that does cubic spline interpolation. So they gave me a book with a sample of it in fortran, and want me to change it to VB and have it up and running with an gui.

This sucks.[/Rant]
 

imported_vr6

Platinum Member
Jul 6, 2001
2,740
0
0
Originally posted by: Anubis
thats sucks dude good luck CSI sucks balls and so does FORTRAN

CSI used to be one of my fav. shows!

This is why i didn't pick math or engineering major, is to avoid the math...:|
 

RaynorWolfcastle

Diamond Member
Feb 8, 2001
8,968
16
81
I don't think that would be too hard, I remember writing a maple program that used matrices to perform CSI with an arbitrary number of points (no frontend, though). Let me see if I can dig it up for you.
 

memo

Golden Member
Jul 16, 2000
1,345
0
0
guh. i think i wrote a matlab program on cubic spline once. its a pretty standard numerical analysis technique though. the theory shouldn't be that bad, that coding would be tough though i bet.
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
So google, you'll find hundreds of descriptions / implementations in pseudocode, C / C++, pascal, probably even VB.

If you want to be a software developer you'll need to get used to learning new things (and not just new APIs and languages), the need will never go away as long as you're working.
 

imported_vr6

Platinum Member
Jul 6, 2001
2,740
0
0
Originally posted by: RaynorWolfcastle
I don't think that would be too hard, I remember writing a maple program that used matrices to perform CSI with an arbitrary number of points (no frontend, though). Let me see if I can dig it up for you.

I have a copy of the sample functions in fortran, a language i saw for the first time today. Just like how i learned Ada last week.

Is this the normal type a work interns do? I like the challenge and all and i know i'll only benefit from this but, i would think that first time interns work on simpler things.:confused:
 

dullard

Elite Member
May 21, 2001
25,954
4,540
126
I personally am an engineer and somewhat a mathematician. I've considered using cubic splines before, but never had the pleasure of actually working with them.

But this isn't a math problem at all. Just a little computer programming problem. You should be able to pretty much copy and paste from fortran into a Visual Basic shell program, tweak a little bit, and be done. I've done that in the past and things are quite simple usually even if you don't understand the math at all. Luckilly an equals sign in fortran is an equals sign in VB. Sure you need to change the math slightly (fortran uses a f'ed up way of doing powers) but that is pretty straight forward and you don't need to understand the math.
 

imported_vr6

Platinum Member
Jul 6, 2001
2,740
0
0
Originally posted by: memo
guh. i think i wrote a matlab program on cubic spline once. its a pretty standard numerical analysis technique though. the theory shouldn't be that bad, that coding would be tough though i bet.

I got the theory down, I am sure i can do it, but it would take a little time. PLus my mentor caught the flu and havn't came in this week, so if i had questions i would have to ask my manager's manager, which isn't what i want to do..
 

Yossarian

Lifer
Dec 26, 2000
18,010
1
81
Originally posted by: Kwan1
Originally posted by: RaynorWolfcastle
I don't think that would be too hard, I remember writing a maple program that used matrices to perform CSI with an arbitrary number of points (no frontend, though). Let me see if I can dig it up for you.

I have a copy of the sample functions in fortran, a language i saw for the first time today. Just like how i learned Ada last week.

Is this the normal type a work interns do? I like the challenge and all and i know i'll only benefit from this but, i would think that first time interns work on simpler things.:confused:

that's exactly what interns do--little jobs that no one else wants. do a kickass job and they will know you are able to learn new stuff on your own and figure out how to get things done. you have sample code to start from so I'm sure you'll be able to work something out.
 

Chu

Banned
Jan 2, 2001
2,911
0
0
I really don't know what your complaning about . . . this would take me no time at all. I had to write a spline program in matlab (including graphing) which took about 4 hours. Then just export it as a .dll and write a VB wrapper for it . . .

-Chu
 

Shivatron

Senior member
Apr 9, 2003
342
0
0
Originally posted by: Chu
I really don't know what your complaning about . . . this would take me no time at all. I had to write a spline program in matlab (including graphing) which took about 4 hours. Then just export it as a .dll and write a VB wrapper for it . . .

-Chu

On the topic of Matlab, for simple interpolation, Matlab has a built in CSI routine. Type "help spline" or have a look at the documentation.
 

Chu

Banned
Jan 2, 2001
2,911
0
0
Originally posted by: Atticu5
Originally posted by: Chu
I really don't know what your complaning about . . . this would take me no time at all. I had to write a spline program in matlab (including graphing) which took about 4 hours. Then just export it as a .dll and write a VB wrapper for it . . .

-Chu

On the topic of Matlab, for simple interpolation, Matlab has a built in CSI routine. Type "help spline" or have a look at the documentation.

The spline program was part of an assignment for a Numerical Analysis class, don't think just using the function would have been kosher ;) Wish I checked the documentation later though, since I just reused the same code to export a .dll as part of an image recognition program I was working on a year later . . .

-Chu
 

memo

Golden Member
Jul 16, 2000
1,345
0
0
Originally posted by: Chu
Originally posted by: Atticu5
Originally posted by: Chu
I really don't know what your complaning about . . . this would take me no time at all. I had to write a spline program in matlab (including graphing) which took about 4 hours. Then just export it as a .dll and write a VB wrapper for it . . .

-Chu

On the topic of Matlab, for simple interpolation, Matlab has a built in CSI routine. Type "help spline" or have a look at the documentation.

The spline program was part of an assignment for a Numerical Analysis class, don't think just using the function would have been kosher ;) Wish I checked the documentation later though, since I just reused the same code to export a .dll as part of an image recognition program I was working on a year later . . .

-Chu


HRM. i had the same assignment :Q IN a Numerical Analysis class
 

imported_vr6

Platinum Member
Jul 6, 2001
2,740
0
0
Originally posted by: Chu
I really don't know what your complaning about . . . this would take me no time at all. I had to write a spline program in matlab (including graphing) which took about 4 hours. Then just export it as a .dll and write a VB wrapper for it . . .

-Chu

Thats because i am not you. Have you done interpolation before you wrote the program? I havn't, but anyway i got it all figured out now. Nothing beats the satisfation of figuring something out and getting it to work how you want it to:beer: