|
From: | Thomas D. Dean |
Subject: | Re: Program problem |
Date: | Wed, 29 Apr 2020 23:26:00 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
On 2020-04-29 15:41, Thomas D. Dean wrote:
On 2020-04-29 11:35, 이태훈 wrote:Hi all Every time I run this code the Octave program disappear. I am using the Octave-4.4.1. app. How can I solve the problem?? function IbX_return_value = IbX(a,b,X,r,I0) I0=1; a=3; b=3; X=9.8; r=0.098;IbthetaX = @(theta) I0.*exp( -a.*X.*( b.*cos(theta).+sqrt(r.^2.-b.^2.*sin(theta).^2) ) );q = integral("IbX", 0, pi); IbX_return_value = (1./pi).*q; endWhen you asked this question under the subject "code question", Bret Green suggested that you read a basic tutorial on programming. Please do that, then, maybe we can help you. With your not understanding basic programming, we can not help.The code you posted is not correct octave code, and should not run. You started a function definition but, never ended it.
Look at https://octave.org/doc/v5.2.0/Simple-Examples.html#Simple-Examples And, the following pages. Tom Dean
[Prev in Thread] | Current Thread | [Next in Thread] |