From: Judas Magnus on
Say i have a structure array with Pizza, and the amount is 99

I need to make a function so that if I sell a Pizza then the amount will be 98, and if i sell it again it will be 97 ... etc
From: us on
"Judas Magnus" <ragnaork5435(a)yahoo.com> wrote in message <hpu7cq$95m$1(a)fred.mathworks.com>...
> Say i have a structure array with Pizza, and the amount is 99
>
> I need to make a function so that if I sell a Pizza then the amount will be 98, and if i sell it again it will be 97 ... etc

what have YOU done so far to solve YOUR particular problem...

us
From: Judas Magnus on
well i can't really figure it out, I mean if I'm selling it, then that would mean I could use the rmfield(Products, 'Pizza') ? to get rid of the item but I'm not sure how to make it work so it removes the inventory only



"us " <us(a)neurol.unizh.ch> wrote in message <hpuiiv$1rt$1(a)fred.mathworks.com>...
> "Judas Magnus" <ragnaork5435(a)yahoo.com> wrote in message <hpu7cq$95m$1(a)fred.mathworks.com>...
> > Say i have a structure array with Pizza, and the amount is 99
> >
> > I need to make a function so that if I sell a Pizza then the amount will be 98, and if i sell it again it will be 97 ... etc
>
> what have YOU done so far to solve YOUR particular problem...
>
> us