Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Using if else statement

Subject: Using if else statement

From: Rai

Date: 18 Jan, 2011 06:25:56

Message: 1 of 2

Hi I need some help with matlab. Currently, i already imported an excel file. The file has 2 columns(time and voltage). I already stored the data in the time column into variable 't' and voltage into variable 'v'. I want to find voltages that has a value of below 150V and their corresponding time value. How do i go about doing that? Thank you.

Subject: Using if else statement

From: Jonas Lundgren

Date: 18 Jan, 2011 07:07:05

Message: 2 of 2

Rai <noti_tazmania10888@hotmail.com> wrote in message <1694585805.4829.1295331986178.JavaMail.root@gallium.mathforum.org>...
> Hi I need some help with matlab. Currently, i already imported an excel file. The file has 2 columns(time and voltage). I already stored the data in the time column into variable 't' and voltage into variable 'v'. I want to find voltages that has a value of below 150V and their corresponding time value. How do i go about doing that? Thank you.

k = find(v < 150);
vlow = v(k);
tlow = t(k);

/Jonas

Tags for this Thread

No tags are associated with this thread.

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.

Contact us