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:
I have a set of data (nxm), how to write a matlab code so that I can select

Subject: I have a set of data (nxm), how to write a matlab code so that I can select

From: J K

Date: 28 Apr, 2013 14:49:08

Message: 1 of 2

The data is 5x5. Consist of diameter and F. When diameter is 3, F is 80, and so on.
d F
3 80
5 100
7 120
9 140
11 160

This is basically an iteration process. The first value of d and F is chosen by the user. The first value of d that I want to select is 7, and the corresponding F is 120. I want to write a program, so that d is equal to the value of d that I select.

This is my code.

load data.dat;
d=data(:,1);
F=data(:,2);

X=find(d,3)
Y=find(F,3)

I don't really know how to write the code, so I just give it a try. The X=find(d,3), because 7, and 120 are in the 3rd row.

But of course the code cannot work.

I hope you do really understand what I'm trying to say.

Thank you

Subject: I have a set of data (nxm), how to write a matlab code so that

From: dpb

Date: 28 Apr, 2013 14:57:26

Message: 2 of 2

On 4/28/2013 9:49 AM, J K wrote:
> The data is 5x5. Consist of diameter and F. When diameter is 3, F is 80,
> and so on.
...

Quit posting new threads on same topic.

I provided you the solution earlier.

--

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