Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Text data save
Replies: 7   Last Post: Oct 14, 2013 5:09 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Bizuayehu Mohammed

Posts: 18
Registered: 5/14/09
Re: Text data save
Posted: Oct 14, 2013 9:09 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

dpb <none@non.net> wrote in message <l0lma3$hrf$1@speranza.aioe.org>...
> On 9/9/2013 6:24 PM, Debela wrote:
>
> ...[Top posting repaired -- don't; hard follow conversation makes]...
>

> > "Steven_Lord" <slord@mathworks.com> wrote in message
> > <kv03oc$t8m$1@newscl01ah.mathworks.com>...

> >>
> >>
> >> "Debela " <bisaye@gmail.com> wrote in message
> >> news:kv01sd$qkf$1@newscl01ah.mathworks.com...

> >> > Hi all,
> >> > I have a problem on analysis of big matrix data, it is 1600x3000.

> >> What I > wanted to do is to select the maximum value of each raw and
> >> save it. For > example, x=data(3,:); max(x); can give me the maximum
> >> value of 3rd raw > out of 1600 but I want for all of them I tried a
> >> for loop and it is not > really successful. Any help would be
> >> appreciated.

> >> > Debela
> >>
> >> Use the DIM input to the MAX function.
> >>
> >> x = magic(7);
> >> maxDownColumns = max(x, [], 1)
> >> maxAcrossRows = max(x, [], 2)

> ...
>

> > Thanks a lot. I still have some issues though. I wanted to find the
> > maximum and corresponding index (Which I can find now), but I want also
> > another value. For example if my maximum value is x, I want to find the
> > index of 0.8 *x and 0.002*x. The closest I came across is I multiplied
> > the maximum values by 0.8 and 0.002. Is there anyway I can find
> > something out of it. I have done in the past using for loop, the data
> > size was smaller though. Thanks.

>
> Same idea, just
>
> ix=find(x==0.8*xmax); % for example
>
> NB: the above is subject to floating point roundoff; use
>
> ix=find(abs(x-0.8*xmax)<1E-6); % or similar w/ a suitable error
>
> --
>
>

Thank you for your response. Let me explain what I did and what exactly I wanted.
I have a matrix size 1200x750;
If I wanted to find the maximum values on all 1200 files I can use the one suggested by Steven. I used that to find the maximum values and I still have questions about the idea mentioned just above by dpd. I want to find for all 1200 files the 0.005* of the maximum and 0.8*of the maximum.
file=1200x750;
x=file(1,:); % the first file
xmax=max(x);
b=find(x>=0.8*xmax);
b1=b(1);
c=find(x>=0.005*xmax);
c1=c(1);
and I want to save these c(1) and b(1) values. This perfectly works if I work for each file individually but I want to find for all files (1200). Any ideas would be appreciated.
Regards



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.