How Does MATLAB Compare to C++ in Computational Physics?

Click For Summary
SUMMARY

This discussion focuses on the comparison between MATLAB and C++ in the context of computational physics. The user seeks resources for writing a MATLAB program utilizing an M-function and inquires about the differences between MATLAB and C++. Recommendations include visiting MATLAB Central for sample code and tutorials, as well as consulting MATLAB's official documentation for comprehensive guidance.

PREREQUISITES
  • Familiarity with MATLAB programming and M-functions
  • Basic understanding of C++ programming concepts
  • Knowledge of computational physics principles
  • Experience with online coding resources and documentation
NEXT STEPS
  • Explore MATLAB Central for sample M-function code
  • Review MATLAB documentation for detailed programming guidelines
  • Compare MATLAB's vectorization capabilities with C++ performance
  • Investigate best practices for integrating MATLAB with C++ code
USEFUL FOR

Students and professionals in computational physics, software developers transitioning from C++ to MATLAB, and anyone seeking to enhance their programming skills in scientific computing.

sapiental
Messages
110
Reaction score
0
Hello,

I have to write a MATLAB program for a problem that utilizes a M-function. I was curious if you guys knew of any good websites that have some sample code for such problems.

Also, I am somewhat familiar with programming in C++. How much does MATLAB differ from this language?

Any help is greatly appreciated.

Thanks.
 
Physics news on Phys.org
Matlab central is one pretty solid place to start :

http://www.mathworks.com/matlabcentral/

...there are lots of tutorials out there about m - files (google and take your pick, or if someone else has an opinion about what is 'best' ...), and MATLAB documentation is a good reference to use as well.
 

Similar threads

Replies
6
Views
4K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 9 ·
Replies
9
Views
5K
  • · Replies 4 ·
Replies
4
Views
7K