Message Boards Message Boards

GROUPS:

Reading the table, selection from the table according to the given equation

Posted 26 days ago
291 Views
|
2 Replies
|
0 Total Likes
|

It is necessary to write a computer program that:
1.) reads the data table "name , W" from the given file.
2.) select the first larger data from the table, taking into account the equation (S=M/W <Sdop). Name of the section and value are printed in an orderly format.
M = 12300000 Nmm, Stop = 78 MPa
(Note: The selected data from the table must appear: W=M/Sdop=12300000/78=15692,3 =>IP-18 , 161.5e3)

Attachments:
POSTED BY: Janez Novak
2 Replies
Posted 26 days ago

The import can be done like this:

initialData = Import[pathToFile, "Data"]

Now you have a list of pairs in initialData: {{IP-8,19500.},{IP-10,34200.},{IP-12,54700.},{IP-14,81900.},{IP-18,161500.},{IP-20,214000.},{IP-22,278700.},{IP-26,442100.},{IP-28,543100.},{IP-30,653000.},{IP-32,782100.},{IP-36,1.09*10^6},{IP-38,1.25*10^6},{IP-40,1.46*10^6}}

As for part 2, I don't understand what you want. You've introduced a bunch of variables without explanation. What is a "section"? What's the "selected data".

POSTED BY: Eric Rimbey
Posted 26 days ago

Section is left coloumn and value is right coloumn in the table. selected data is section and value together (example: IP-18 , 161.5e3 ). Sorry for poor english. Can you please solve part 2 of the exercise.

POSTED BY: Janez Novak
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract