help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: operator +: nonconformant arguments (op1 is 10x10, op2 is 10x9)


From: Mike Miller
Subject: Re: operator +: nonconformant arguments (op1 is 10x10, op2 is 10x9)
Date: Thu, 9 Aug 2018 09:46:47 -0700
User-agent: Mutt/1.10.1 (2018-07-13)

On Thu, Aug 09, 2018 at 12:03:38 -0400, Doug Stewart wrote:
> Mike I  am trying to solve this problem, but???
> 
> I changed the last line to be
>  Acl=sys.A + sys.B*ones(16,9);
> 
> now if I run it  it says sys.A is 10x10
>  but if I change the last line to
> 
>  Acl=sys.A + sys.B*ones(16,10);
> 
> It now says sys.A is 9x9
> 
> how can changing the dimensions of the ones command change
> an already stored data in sys?

If you are running the OP's script, it's because you are looking at two
different iterations of the loop.

When n_cycle is 1, the system has A and B matrices with 9 rows. When
n_cycle is 2 or greater, the system has A and B matrices with 10 rows.

You'll have to look into how the system is created differently on each
iteration through the loop.

At a glance, it looks to me like almost everything is constant except
for the variable kv.

-- 
mike

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]