Insights Blog
-- Browse All Articles --
Physics Articles
Physics Tutorials
Physics Guides
Physics FAQ
Math Articles
Math Tutorials
Math Guides
Math FAQ
Education Articles
Education Guides
Bio/Chem Articles
Technology Guides
Computer Science Tutorials
Forums
Intro Physics Homework Help
Advanced Physics Homework Help
Precalculus Homework Help
Calculus Homework Help
Bio/Chem Homework Help
Engineering Homework Help
Trending
Featured Threads
Log in
Register
What's new
Search
Search
Search titles only
By:
Intro Physics Homework Help
Advanced Physics Homework Help
Precalculus Homework Help
Calculus Homework Help
Bio/Chem Homework Help
Engineering Homework Help
Menu
Log in
Register
Navigation
More options
Contact us
Close Menu
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Forums
Homework Help
Engineering and Comp Sci Homework Help
[Wolfram Mathematica] - how scripts work in Mathematica
Reply to thread
Message
[QUOTE="Hernaner28, post: 4563990, member: 401900"] [b][Wolfram Mathematica] -- how scripts work in Mathematica[/b] Hi. This is not a homework. I just did a script in Octave and I've just finished writing it on Wolfram Mathematica. The problem is that I don't know how to define the function, I don't know how scripts work in Mathematica. My script should be like this: [CODE]Euler[c_,final_,step_,o_,r_,b_]:= x=ConstantArray[0,{final/step,3}]; For[i=2,i<= final/step,i++, ReplacePart[x, {i,1}->o*(x[[2,i-1]]-x[[1,i-1]])*step+x[[1,i-1]]] ReplacePart[x, {i,2}-> step*(r*x[[1,i-1]]-x[[2,i-1]]-x[[1,i-1]]*x[[3,i-1]])+x[[2,i-1]]] ReplacePart[x, {i,3}-> step*(x[[1,i-1]]*x[[2,i-1]]-b*x[[3,i-1]])+x[[3,i-1]]] ][/CODE] But that has a wrong syntax. I just want to type Euler and some parameters and receive that large matrix. How is that done in Mathematica? Thanks! EDIT: I forgot to write the title! I just typed the Tag, I cannot edit it now, sorry [/QUOTE]
Insert quotes…
Post reply
Forums
Homework Help
Engineering and Comp Sci Homework Help
[Wolfram Mathematica] - how scripts work in Mathematica
Back
Top