Explore BrainMass
Share

Write, compile and run a hello program in MATLAB

This content was STOLEN from BrainMass.com - View the original, and get the already-completed solution here!

I need a detailed script in order to show this works in MATLAB.

----> Kernighan and Ritchie, who created the C language, advise that, "The first program to write in any language is the same for all languages: Print the words "hello, world". This is the basic hurdle; to leap over it you have to be able to create program text somewhere, compile it successfully, load it, run it, and find out where your output went. With these mechanical details mastered, everything else is comparatively easy."

Write, compile and run a hello program.

© BrainMass Inc. brainmass.com October 24, 2018, 8:59 pm ad1c9bdddf
https://brainmass.com/computer-science/matlab/write-compile-and-run-a-hello-program-in-matlab-113376

Solution Preview

There are several ways of writing this program.
Please see the attached .m files for two ways. You need to save the file to your computer, ...

Solution Summary

It provides sample codes in MATLAB to run a "hello" program. The response was rated '5/5' by the student who posted the question originally.

$2.19
See Also This Related BrainMass Solution

Matlab and roots

Hi,

I need help in using Matlab to build an m file for
solving non-linear equations using the Newton-Raphson
method (or another recommended method.) I need a clear
explanation of the process of creating an m file, and
also using it to find the roots of the following two
equations as examples:

1) f(x) = exp(-x) - sin((pi/2)*x)

2) x^5 - 17*x^4 + 124*x^3 - 508*x^2 + 1035*x - 875 = 0

The method must also find complex roots if they exist.

View Full Posting Details