Skip to Main Content Skip to Search
Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Thread Subject: two matlab questions from a beginner

Subject: two matlab questions from a beginner

From: Rance

Date: 23 Jun, 2008 04:04:27

Message: 1 of 3

Hello

I appreciate any help that someone could offer!
I'm sure there is a simple fix to my problem(s).

I am using the uigetfile function to load in a .txt file. Following a few operations I would like to save a new variable with the filename obtained with the uigetfile function but add a small extension to the name.

Currently I open the file - [filename, pathname, filterindex] = uigetfile('*.txt', 'Pick file');

I do a few things to the file I select. Now have a new matrix (lets call it A). I would like to save this file as the filename obtained from the uigetfile function plus a (-A) or (-new) appended to it.

My second question is as follows:
I have a large column of data and I would like to evaluate when the data becomes less than a predetermined value(this I can do).

The second part of this requires the data to be less than the predetermined value, however I would like to specify that there has to be, for example, 3 consecutive data points greater than the predetermined value, for it to 'count' or be considered for further analysis.

I apologize it I should not have posted these questions here.

Thanks for any help

Subject: Re: two matlab questions from a beginner

From: Titus

Date: 23 Jun, 2008 07:15:54

Message: 2 of 3


"Rance" <holmes.mike@gmail.com> schrieb im Newsbeitrag
news:6053174.1214193898136.JavaMail.jakarta@nitrogen.mathforum.org...
> Hello
>
> I appreciate any help that someone could offer!
> I'm sure there is a simple fix to my problem(s).
>
> I am using the uigetfile function to load in a .txt file. Following a few
> operations I would like to save a new variable with the filename obtained
> with the uigetfile function but add a small extension to the name.
>
> Currently I open the file - [filename, pathname, filterindex] =
> uigetfile('*.txt', 'Pick file');
>
> I do a few things to the file I select. Now have a new matrix (lets call
> it A). I would like to save this file as the filename obtained from the
> uigetfile function plus a (-A) or (-new) appended to it.
>
> My second question is as follows:
> I have a large column of data and I would like to evaluate when the data
> becomes less than a predetermined value(this I can do).
>
> The second part of this requires the data to be less than the
> predetermined value, however I would like to specify that there has to be,
> for example, 3 consecutive data points greater than the predetermined
> value, for it to 'count' or be considered for further analysis.
>
> I apologize it I should not have posted these questions here.
>
> Thanks for any help


Hi Rance,

I'll got for the easier question (the first one) ;-):
use the functional form of save: save([filename '_A'], A)

Titus



Subject: Re: two matlab questions from a beginner

From: Rance

Date: 23 Jun, 2008 13:32:00

Message: 3 of 3

Thanks a lot! Turns out I was on the right track with this, just had some typos.

I appreciate the help!

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

envelope graphic E-mail this page to a colleague

Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.
Related Topics