Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program in MATLAB that accomplishes this: I don't know much about computer science, I am having to learn for this class as I

Write a program in MATLAB that accomplishes this:

I don't know much about computer science, I am having to learn for this class as I go. If the code can't be translated exactly because perhaps whatever MATLAB uses doesn't work the same way as TrueBasic, that's fine. I just need to take the essence of what this code is doing and have it done in MATLAB instead. Can someone help me with that?

I posted this question already, but got no responses. maybe I worded it wrong. So I am trying again. you can post your answer to both my questions about MATLAB and this code and get credit for both.

image text in transcribedimage text in transcribedimage text in transcribed

! simulation of radioactive decay ! N. Giordano 10-1-94 program decay option nolet ! can omit the let keyword library "sgfunc*", "sglib*" ! the graphics routines are found here dim n_uranium (100), t (100) ! declare the arrays we will need call initialize (n_uranium, t, tau, dt) ! use subroutines to do the work call calculate (n_uranium, t, tau, dt). call display (n_uranium, t, tau, dt) end ! initialize variables sub initialize (nuclei (),t(), time_constant, dt). input prompt "initial number of nuclei -> ": nuclei (1) t (1) = 0 input prompt "time constant -> ": time_constant input prompt "time step -> ": dt end sub sub calculate (n_uranium (),t (), tau, dt) for i = 1 to size (t) -1 ! now use the Euler method n_uranium (i+1) = n_uranium (i) - (n_uranium (i) 7 tau) * dt t(i+1) = t (i) + dt next i end sub

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Third International Conference Achids 2011 Daegu Korea April 2011 Proceedings Part 2 Lnai 6592

Authors: Ngoc Thanh Nguyen ,Chong-Gun Kim ,Adam Janiak

2011th Edition

3642200419, 978-3642200410

More Books

Students also viewed these Databases questions

Question

3. List ways to manage relationship dynamics

Answered: 1 week ago