|
From: | Thomas D. Dean |
Subject: | Re: Program problem |
Date: | Wed, 29 Apr 2020 15:41:20 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
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; end
When 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.
Tom Dean
[Prev in Thread] | Current Thread | [Next in Thread] |