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:
how to compare comma seperated data in to integer data

Subject: how to compare comma seperated data in to integer data

From: prabhu

Date: 1 Sep, 2010 14:09:21

Message: 1 of 2

i have some data in comma separated file format.... i want to compare tat wit one integer data.... if that data is equal to the values in tat file means i want to display true how / ? ? ?


help me


EX

a=2;
x=csvread('data.txt');
x=[1 3 2 4]


how any one help me....

Subject: how to compare comma seperated data in to integer data

From: Wayne King

Date: 1 Sep, 2010 14:21:20

Message: 2 of 2

"prabhu " <kprabhucbe@gmail.com> wrote in message <i5lmqg$9vs$1@fred.mathworks.com>...
> i have some data in comma separated file format.... i want to compare tat wit one integer data.... if that data is equal to the values in tat file means i want to display true how / ? ? ?
>
>
> help me
>
>
> EX
>
> a=2;
> x=csvread('data.txt');
> x=[1 3 2 4]
>
>
> how any one help me....

Hi Prabhu, I think you have to give us a little more specific information about what you mean by compare. Do you simply mean

a=2;
x=[1 3 2 4];
[tf,loc] = ismember(a,x);

Or something different?

Wayne

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