Tag Info

New answers tagged

1

How about: data = Import[file.xls, {"Data", 1}]


0

After some research I've found this partial solution: Step 1: Open Excel (if you have it!) Step 2: Open Excel Link Needs["ExcelLink`"] Step 3: If you don't have any DDE Link for Excel, simulate real time data using Dynamic[Refresh[Excel["B1"] = RandomInteger[100], UpdateInterval -> 1]] Step 4: Import back to Mathematica your simulated data a = ...


5

You can use Apply and StringSplit to help out: rawData = {{"a,b"}, {"c,d"}, {"e,f"}}; Apply[StringSplit[#, ","] &, rawData, {1}] (*output in InputForm to show structure more clearly*) {{"a", "b"}, {"c", "d"}, {"e", "f"}}


2

Since the x and y values are evenly spaced, I will mention that another option is to give ListContourPlot just the data array rather than a list of triplets, and use the DataRange option to specify the ranges of the axes. Starting from Mr Wizard's row, col and tbl2: ListContourPlot[tbl2, DataRange -> {row[[{1, -1}]], col[[{1, -1}]]}]


3

I was going to propose this, which is similar to Mr.Wizard's answer, but using a simple table rather than rules. I've already removed the outer braces from data: dimensions = Dimensions[data] {5, 8} triplets = Flatten[ Table[ { data[[1, column]], data[[row, 1]], data[[row, column]] }, {row, 2, First[dimensions]}, ...


2

Starting with your data as given: tbl = {{{"", 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.}, {0.3, 0.00122, 0.00182, 0.00247, 0.00311, 0.00382, 0.00453, 0.00524}, {0.4, 0.000949, 0.00149, 0.0021, 0.00272, 0.00337, 0.00406, 0.00477}, {0.5, 0.000714, 0.00123, 0.00176, 0.00233, 0.00295, 0.00361, 0.00425}, {0.6, 0.000519, 0.000982, 0.00147, 0.002, ...


1

You probably want to map your function over a suitable list of points which fit the needs of the values you require. RandomInteger[{1, 10}, {20,2}]; f = BSplineFunction[%] Export["myfile.tsv",f[#]&/@ Range[0, 1, 0.1]] {{31., 76.}, {52.4823, 17.653}, {29.8387, 21.6133}, {47.3833, 64.0472}, {39.5027, 23.1}, {53.2083, 46.5833}, {58.128, ...



Top 50 recent answers are included