error: scalar cannot be indexed with .

Lester Anderson <[email protected]> Wed, 1 Sep 2021 12:14:50 +0100
Newsgroups gmane.comp.gnu.octave.general
Message-ID <CAE3taFCg_i9ZdhmpPTz3HNJ1Xs50+_G21s170ZXoVQXrx-YWRQ@mail.gmail.com>
Hello,

I am trying to run the attached code, but it fails at line 51
Input parameters:
>> obs(1) =
struct('type','fixed','r',2,'phi',pi/4,'pulsePeriod',0.5,'n',400) ;
>> obs(2) =
struct('type','free','r',1.5,'phi',pi/4,'pulsePeriod',0.5,'n',400) ;
>> run_Schwarzschild(obs,8,[0 2.5 0 2.5])
error: scalar cannot be indexed with .
error: called from
    run_Schwarzschild at line 51 column 10

Not sure how to solve this?

Lester


----------
We are transitioning to a web based forum
for community help discussions at
https://octave.discourse.group/c/help
run_Schwarzschild.m (application/octet-stream, 6.8 KB) - not displayed