cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

How can I import data ?

jlee-2
7-Bedrock

How can I import data ?

Dear Mathcad Professors

I am a student. I am going to study Matcad S/W and I have a problem.  

The problem is that I don't know to import data according to any data varidation.

For example)

Excel 

A=250~500,   B= [ 1, 2, 3, 4, 5]

A=100~250,   B= [ 1, 3, 5, 7, 9]

A=0~100,   B= [ 0, 1, 2, 3, 4]

If I need to import these data to Math-cad S/W acorroding to 'A' data variation 

How can I do?

I sincerly need to help. Thank you for reading my question

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:jlee-2)

Fortunately you are not using Prime 3.1, so I could read your file.

The attached file of mine is in Prime 3.0 format. So if you use Prime 2, you won't be able to open it and have to resort to the attached pictures.

Maybe something like the following does what you want?

I also added a function to return lift and drag values for a given angle using linear interpolation. Guess the table refers to the dimensionless lift and drag coefficients.

Regards Werner

EDIT: Added plots for lift and drag - comparing the tables for different Reynold numbers:

View solution in original post

9 REPLIES 9

Sorry, what is it Mathcad S/W?

One simple with Mathcad 15:

copy.png

StuartBruff
23-Emerald III
(To:jlee-2)

jinsuk Lee wrote:

Dear Mathcad Professors

I am a student. I am going to study Matcad S/W and I have a problem. 

The problem is that I don't know to import data according to any data varidation.

For example)

Excel

A=250~500,   B= [ 1, 2, 3, 4, 5]

A=100~250,   B= [ 1, 3, 5, 7, 9]

A=0~100,   B= [ 0, 1, 2, 3, 4]

If I need to import these data to Math-cad S/W acorroding to 'A' data variation

How can I do?

I sincerly need to help. Thank you for reading my question

I presume by "S/W" you mean "software"?  Do you know which version of Mathcad you intend to use (do use?)? There are two major families of Mathcad: Mathcad Prime (the latest version being Prime 3.1) and the older non-Prime Mathcad (Mathcad 15 being the latest version). 

There are several ways to import Excel data into Mathcad.  The READEXCEL function is probably the most versatile.   Many people find the Excel component to be the most convenient, though.

In your example, are both A and B in Excel?  Do you calculate B from A within Excel? Are the 3 ranges in different Excel workbooks or worksheets or are they all on the same worksheet?  Could you post a example workbook(s) to give a clearer idea of what you want?

If you want to select the B data given A's value, then you may find it easier to import all of B from Excel and then select the values you want from the A values.  For example, (assuming you have read B in from the Excel file):

Stuart

First, Thank you for your consideration.

I use Mathcad-prime.

I attached my file.

thak you for my reading question

Werner_E
25-Diamond I
(To:jlee-2)

Fortunately you are not using Prime 3.1, so I could read your file.

The attached file of mine is in Prime 3.0 format. So if you use Prime 2, you won't be able to open it and have to resort to the attached pictures.

Maybe something like the following does what you want?

I also added a function to return lift and drag values for a given angle using linear interpolation. Guess the table refers to the dimensionless lift and drag coefficients.

Regards Werner

EDIT: Added plots for lift and drag - comparing the tables for different Reynold numbers:

jlee-2
7-Bedrock
(To:Werner_E)

Thank you very much.

I will study that you write answer and I will apply to my work to import considering Reynolds.

Again. Very thank you much.

I felt very Gratitude.

StuartBruff
23-Emerald III
(To:jlee-2)

jinsuk Lee wrote:

First, Thank you for your consideration.

I use Mathcad-prime.

I attached my file.

thak you for my reading question

No problem.  I think the attached may do what you want.  It shows a couple of ways of doing it.

The first approach takes up a bit more memory (which isn't even worth considering such a small amount of data - it might be if you want to play with megabytes of data) but has the advantage of only reading the data in once, resulting in quicker evaluation within Mathcad and giving you more flexibility if you want to look at the performance data in parallel.

The second approach has the advantage of reading in just the data you want for the give Reynolds number and allows you to specify more directly which rows and columns you want (as opposed to working out the column and row numbers).

Stuart

I will talk with you to say "thank you"

your aid is also great.

Again, Thank you very much

AlvaroDíaz
12-Amethyst
(To:jlee-2)

There are also a problem with the international specification. You can see that seven is paste as number, but others as string. You can change the decimal comma by a dot somewhere in windows settings, in "international settings" (not in excel), and try again to copy and paste.

AlvaroDíaz wrote:

There are also a problem with the international specification. You can see that seven is paste as number, but others as string. You can change the decimal comma by a dot somewhere in windows settings, in "international settings" (not in excel), and try again to copy and paste.

Yes, see please my message. I must sometimes use find "," and replace to "." and the function str2num for numbers but not strings having!

See Decimal mark - Wikipedia, the free encyclopedia

Blue - points

Green - comma

Red color - ??? (wars - Syria, Iraq, Afghanistan...)

940px-DecimalSeparator.svg.png

Announcements

Top Tags