Linear Algebra Library in Atmel Studio 6.2

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Guys,

I am using Atmel Studio 6.2 and need to solve 4 equations in 4 unknowns and am wondering if there is a linear algebra library out there I can include in my project so I don't have to derive the equations myself.

 

Thanks,

mark

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A quick search found this: http://arma.sourceforge.net/ kinda what you are looking for? (Note I have not used this...)

  • "Give me six hours to chop down a tree and I will spend the first four sharpening the axe."  -- Abraham Lincoln
  • "All right wise guy, where am I?"   -- Daffy Duck
  • "Well, we're safe for now. Thank goodness we're in a bowling alley."  -- Big Bob, Pleasantville
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That looks pretty interesting.  It has just about everything, and works with gnu.  I'm not sure how I would add a C++ library to a C project.  I guess I would have to change my project to a C++ project, and then add the library.

 

Thanks for finding that.  It looks pretty interesting.

 

mark

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MarkThomas wrote:
I guess I would have to change my project to a C++ project, and then add the library.

That's the easy way.

 

(failing that you can do nasty things with singleton instantiation of classes and a lot of messing with extern "C" and so on - but you don't want to go there!).

 

I'm confused though - does the AVR really have to solve these questions at run time? or is this something where you derive a solution on the PC then hard code that into AVR code? If so you don't need the lib running on the AVR and you can probably use Matlab on the PC.

Last Edited: Thu. Feb 18, 2016 - 11:05 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Cliff,

Check your private messages.

mark

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I found the gnu scientific library that has all kinds of good stuff in it, but I am having a hard time figuring out how to install it.  I don't know how to proceed.  It is a C library.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Put the .c & .h files in the same directory as your project.

 

In the file that contains main(), #include "headerfile.h" (where "headerfile" is replaced by the actual file name).

Add the c files to the project in the Solution Explorer. Right-click the solution name, and choose "Add" from the popup menu (AS7). Then select a c file you wish to add to the solution. I think it is the same process in AS6.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Last Edited: Thu. Feb 18, 2016 - 10:22 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey Jim,

Yup, that's how you do it.  I was way overthinking the library thing.  Thanks so much for your comment.  It was perfect.  I remember seeing an FTP site for the .c source code when I was googling around, and the .h files are around too.  I built a library with all the files I wrote and found and use all the time, but I always end up adding the .c and .h files to the project from the library source code.  I like to be able to go back and look at some of those library files I wrote.

 

But thanks again for the comment.  It clicked, and now all I have to do is go find those files.

 

mark