how can I export multidimensional matrix from julia in excel?How can I create a two dimensional array in JavaScript?How to Flatten a Multidimensional Array?How to use searchsorted on a column of a multidimensional array in Julia?How to construct a matrix in Julia sequentially?How to append a vector to Julia matrix as a row?Assignment to multidimensional array in juliaJulia multidimensional array types?Subsampling a multidimensional array in JuliaHow to convert a multidimensional array to/from vector of vector of … vector in juliaConcatenate Multidimensional arrays in Julia
Can one guy with a duplicator initiate a nuclear apocalypse?
What did the controller say during my approach to land (audio clip)?
Should the pagination be reset when changing the order?
What do solvers like Gurobi and CPLEX do when they run into hard instances of MIP
Weapon class firing logic in JavaScript
Exam design: give maximum score per question or not?
Convert dictionaries with list of values into a dataframe
Can I separate garlic into cloves for storage?
Get the encrypted payload from an unencrypted wrapper PDF document
Quick Kurodoko Puzzle: Threes and Triples
Why are there two bearded faces wearing red hats on my stealth bomber icon?
Removing rows containing NA in every column
Is “卧草” a proper Chinese word?
Is the name of an interval between two notes unique and absolute?
How does one calculate the distribution of the Matt Colville way of rolling stats?
Floating Point XOR
How could artificial intelligence harm us?
Minimize taxes now that I earn more
Other than good shoes and a stick, what are some ways to preserve your knees on long hikes?
Did slaves have slaves?
Is Zack Morris's 'time stop' ability in "Saved By the Bell" a supernatural ability?
Is there any actual security benefit to restricting foreign IPs?
Lead Amalgam as a Material for a Sword
Debussy as term for bathroom?
how can I export multidimensional matrix from julia in excel?
How can I create a two dimensional array in JavaScript?How to Flatten a Multidimensional Array?How to use searchsorted on a column of a multidimensional array in Julia?How to construct a matrix in Julia sequentially?How to append a vector to Julia matrix as a row?Assignment to multidimensional array in juliaJulia multidimensional array types?Subsampling a multidimensional array in JuliaHow to convert a multidimensional array to/from vector of vector of … vector in juliaConcatenate Multidimensional arrays in Julia
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have a multiple dimensional matrix in my result for example x[i,j,k,t]. how can I export it from Julia in excel?
for example I have this matrix in Julia. I coded a location inventory vehicle routing model in Julia. that is the optimum routing matrix. I want to export it in excel. please help me.
`xx
x: 4 dimensions:
[1,:,:,:]
[1,1,:,:]
[1,1,1,:]
[1,1,1,1] = 0.0
[1,1,1,2] = 0.0
[1,1,1,3] = 0.0
[1,1,2,:]
[1,1,2,1] = 0.0
[1,1,2,2] = 0.0
[1,1,2,3] = 0.0
[1,1,3,:]
[1,1,3,1] = 0.0
[1,1,3,2] = 0.0
[1,1,3,3] = 0.0
[1,2,:,:]
[1,2,1,:]
[1,2,1,1] = -0.0
[1,2,1,2] = 0.0
[1,2,1,3] = 0.0
[1,2,2,:]
[1,2,2,1] = 0.0
[1,2,2,2] = 0.0
[1,2,2,3] = 0.0
[1,2,3,:]
[1,2,3,1] = 0.0
[1,2,3,2] = 0.0
[1,2,3,3] = 0.0
[1,3,:,:]
[1,3,1,:]
[1,3,1,1] = -0.0
[1,3,1,2] = 0.0
[1,3,1,3] = 0.0
[1,3,2,:]
[1,3,2,1] = 0.0
[1,3,2,2] = 0.0
[1,3,2,3] = -0.0
[1,3,3,:]
[1,3,3,1] = 0.0
[1,3,3,2] = 0.0
[1,3,3,3] = 0.0
[1,4,:,:]
[1,4,1,:]
[1,4,1,1] = -0.0
[1,4,1,2] = -0.0
[1,4,1,3] = -0.0
[1,4,2,:]
[1,4,2,1] = -0.0
[1,4,2,2] = -0.0
[1,4,2,3] = -0.0
[1,4,3,:]
[1,4,3,1] = 0.0
[1,4,3,2] = 0.0
[1,4,3,3] = 0.0
[1,5,:,:]
[1,5,1,:]
[1,5,1,1] = -0.0
[1,5,1,2] = -0.0
[1,5,1,3] = -0.0
[1,5,2,:]
[1,5,2,1] = -0.0
[1,5,2,2] = -0.0
[1,5,2,3] = 0.0
[1,5,3,:]
[1,5,3,1] = -0.0
[1,5,3,2] = 0.0
[1,5,3,3] = 0.0
[1,6,:,:]
[1,6,1,:]
[1,6,1,1] = -0.0
[1,6,1,2] = -0.0
[1,6,1,3] = -0.0
[1,6,2,:]
[1,6,2,1] = -0.0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,2,:]
[6,5,2,1] = -0.0
[6,5,2,2] = -0.0
[6,5,2,3] = 1.0
[6,5,3,:]
[6,5,3,1] = 1.0
[6,5,3,2] = 0.9999999999999996
[6,5,3,3] = 0.0
[6,6,:,:]
[6,6,1,:]
[6,6,1,1] = 0.0
[6,6,1,2] = 0.0
[6,6,1,3] = 0.0
[6,6,2,:]
[6,6,2,1] = 0.0
[6,6,2,2] = 0.0
[6,6,2,3] = 0.0
[6,6,3,:]
[6,6,3,1] = 0.0
[6,6,3,2] = 0.0
[6,6,3,3] = 0
.0`
multidimensional-array julia
add a comment
|
I have a multiple dimensional matrix in my result for example x[i,j,k,t]. how can I export it from Julia in excel?
for example I have this matrix in Julia. I coded a location inventory vehicle routing model in Julia. that is the optimum routing matrix. I want to export it in excel. please help me.
`xx
x: 4 dimensions:
[1,:,:,:]
[1,1,:,:]
[1,1,1,:]
[1,1,1,1] = 0.0
[1,1,1,2] = 0.0
[1,1,1,3] = 0.0
[1,1,2,:]
[1,1,2,1] = 0.0
[1,1,2,2] = 0.0
[1,1,2,3] = 0.0
[1,1,3,:]
[1,1,3,1] = 0.0
[1,1,3,2] = 0.0
[1,1,3,3] = 0.0
[1,2,:,:]
[1,2,1,:]
[1,2,1,1] = -0.0
[1,2,1,2] = 0.0
[1,2,1,3] = 0.0
[1,2,2,:]
[1,2,2,1] = 0.0
[1,2,2,2] = 0.0
[1,2,2,3] = 0.0
[1,2,3,:]
[1,2,3,1] = 0.0
[1,2,3,2] = 0.0
[1,2,3,3] = 0.0
[1,3,:,:]
[1,3,1,:]
[1,3,1,1] = -0.0
[1,3,1,2] = 0.0
[1,3,1,3] = 0.0
[1,3,2,:]
[1,3,2,1] = 0.0
[1,3,2,2] = 0.0
[1,3,2,3] = -0.0
[1,3,3,:]
[1,3,3,1] = 0.0
[1,3,3,2] = 0.0
[1,3,3,3] = 0.0
[1,4,:,:]
[1,4,1,:]
[1,4,1,1] = -0.0
[1,4,1,2] = -0.0
[1,4,1,3] = -0.0
[1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.0
[6,3,1,3] = -0.0
[6,3,2,:]
[6,3,2,1] = -0.0
[6,3,2,2] = -0.0
[6,3,2,3] = -0.0
[6,3,3,:]
[6,3,3,1] = -0.0
[6,3,3,2] = -0.0
[6,3,3,3] = -0.0
[6,4,:,:]
[6,4,1,:]
[6,4,1,1] = -0.0
[6,4,1,2] = -0.0
[6,4,1,3] = -0.0
[6,4,2,:]
[6,4,2,1] = -0.0
[6,4,2,2] = -0.0
[6,4,2,3] = -0.0
[6,4,3,:]
[6,4,3,1] = -0.0
[6,4,3,2] = 0.0
[6,4,3,3] = -0.0
[6,5,:,:]
[6,5,1,:]
[6,5,1,1] = 0.0
[6,5,1,2] = 0.0
[6,5,1,3] = -0.0
[6,5,2,:]
[6,5,2,1] = -0.0
[6,5,2,2] = -0.0
[6,5,2,3] = 1.0
[6,5,3,:]
[6,5,3,1] = 1.0
[6,5,3,2] = 0.9999999999999996
[6,5,3,3] = 0.0
[6,6,:,:]
[6,6,1,:]
[6,6,1,1] = 0.0
[6,6,1,2] = 0.0
[6,6,1,3] = 0.0
[6,6,2,:]
[6,6,2,1] = 0.0
[6,6,2,2] = 0.0
[6,6,2,3] = 0.0
[6,6,3,:]
[6,6,3,1] = 0.0
[6,6,3,2] = 0.0
[6,6,3,3] = 0
.0`
multidimensional-array julia
1
Can you please specify how you want the data to look like in Excel?
– Bogumił Kamiński
Mar 27 at 18:34
xx x: 4 dimensions: [1,:,:,:] [1,1,:,:] [1,1,1,:] [1,1,1,1] = 0.0 [1,1,1,2] = 0.0 [1,1,1,3] = 0.0 [1,1,2,:] [1,1,2,1] = 0.0 [1,1,2,2] = 0.0 [1,1,2,3] = 0.0
I have this matrix in my code that i=1...6, j=1...6, k=1...3, t=1...3
– Soma
Mar 28 at 13:40
5
Please edit your post to include any additional information you have to your question. Avoid adding this in the comments.
– E_net4
Mar 28 at 14:19
add a comment
|
I have a multiple dimensional matrix in my result for example x[i,j,k,t]. how can I export it from Julia in excel?
for example I have this matrix in Julia. I coded a location inventory vehicle routing model in Julia. that is the optimum routing matrix. I want to export it in excel. please help me.
`xx
x: 4 dimensions:
[1,:,:,:]
[1,1,:,:]
[1,1,1,:]
[1,1,1,1] = 0.0
[1,1,1,2] = 0.0
[1,1,1,3] = 0.0
[1,1,2,:]
[1,1,2,1] = 0.0
[1,1,2,2] = 0.0
[1,1,2,3] = 0.0
[1,1,3,:]
[1,1,3,1] = 0.0
[1,1,3,2] = 0.0
[1,1,3,3] = 0.0
[1,2,:,:]
[1,2,1,:]
[1,2,1,1] = -0.0
[1,2,1,2] = 0.0
[1,2,1,3] = 0.0
[1,2,2,:]
[1,2,2,1] = 0.0
[1,2,2,2] = 0.0
[1,2,2,3] = 0.0
[1,2,3,:]
[1,2,3,1] = 0.0
[1,2,3,2] = 0.0
[1,2,3,3] = 0.0
[1,3,:,:]
[1,3,1,:]
[1,3,1,1] = -0.0
[1,3,1,2] = 0.0
[1,3,1,3] = 0.0
[1,3,2,:]
[1,3,2,1] = 0.0
[1,3,2,2] = 0.0
[1,3,2,3] = -0.0
[1,3,3,:]
[1,3,3,1] = 0.0
[1,3,3,2] = 0.0
[1,3,3,3] = 0.0
[1,4,:,:]
[1,4,1,:]
[1,4,1,1] = -0.0
[1,4,1,2] = -0.0
[1,4,1,3] = -0.0
[1,4,2,:]
[1,4,2,1] = -0.0
[1,4,2,2] = -0.0
[1,4,2,3] = -0.0
[1,4,3,:]
[1,4,3,1] = 0.0
[1,4,3,2] = 0.0
[1,4,3,3] = 0.0
[1,5,:,:]
[1,5,1,:]
[1,5,1,1] = -0.0
[1,5,1,2] = -0.0
[1,5,1,3] = -0.0
[1,5,2,:]
[1,5,2,1] = -0.0
[1,5,2,2] = -0.0
[1,5,2,3] = 0.0
[1,5,3,:]
[1,5,3,1] = -0.0
[1,5,3,2] = 0.0
[1,5,3,3] = 0.0
[1,6,:,:]
[1,6,1,:]
[1,6,1,1] = -0.0
[1,6,1,2] = -0.0
[1,6,1,3] = -0.0
[1,6,2,:]
[1,6,2,1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0
[6,5,2,:]
[6,5,2,1] = -0.0
[6,5,2,2] = -0.0
[6,5,2,3] = 1.0
[6,5,3,:]
[6,5,3,1] = 1.0
[6,5,3,2] = 0.9999999999999996
[6,5,3,3] = 0.0
[6,6,:,:]
[6,6,1,:]
[6,6,1,1] = 0.0
[6,6,1,2] = 0.0
[6,6,1,3] = 0.0
[6,6,2,:]
[6,6,2,1] = 0.0
[6,6,2,2] = 0.0
[6,6,2,3] = 0.0
[6,6,3,:]
[6,6,3,1] = 0.0
[6,6,3,2] = 0.0
[6,6,3,3] = 0
.0`
multidimensional-array julia
I have a multiple dimensional matrix in my result for example x[i,j,k,t]. how can I export it from Julia in excel?
for example I have this matrix in Julia. I coded a location inventory vehicle routing model in Julia. that is the optimum routing matrix. I want to export it in excel. please help me.
`xx
x: 4 dimensions:
[1,:,:,:]
[1,1,:,:]
[1,1,1,:]
[1,1,1,1] = 0.0
[1,1,1,2] = 0.0
[1,1,1,3] = 0.0
[1,1,2,:]
[1,1,2,1] = 0.0
[1,1,2,2] = 0.0
[1,1,2,3] = 0.0
[1,1,3,:]
[1,1,3,1] = 0.0
[1,1,3,2] = 0.0
[1,1,3,3] = 0.0
[1,2,:,:]
[1,2,1,:]
[1,2,1,1] = -0.0
[1,2,1,2] = 0.0
[1,2,1,3] = 0.0
[1,2,2,:]
[1,2,2,1] = 0.0
[1,2,2,2] = 0.0
[1,2,2,3] = 0.0
[1,2,3,:]
[1,2,3,1] = 0.0
[1,2,3,2] = 0.0
[1,2,3,3] = 0.0
[1,3,:,:]
[1,3,1,:]
[1,3,1,1] = -0.0
[1,3,1,2] = 0.0
[1,3,1,3] = 0.0
[1,3,2,:]
[1,3,2,1] = 0.0
[1,3,2,2] = 0.0
[1,3,2,3] = -0.0
[1,3,3,:]
[1,3,3,1] = 0.0
[1,3,3,2] = 0.0
[1,3,3,3] = 0.0
[1,4,:,:]
[1,4,1,:]
[1,4,1,1] = -0.0
[1,4,1,2] = -0.0
[1,4,1,3] = -0.0
[1,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0
[6,3,1,3] = -0.0
[6,3,2,:]
[6,3,2,1] = -0.0
[6,3,2,2] = -0.0
[6,3,2,3] = -0.0
[6,3,3,:]
[6,3,3,1] = -0.0
[6,3,3,2] = -0.0
[6,3,3,3] = -0.0
[6,4,:,:]
[6,4,1,:]
[6,4,1,1] = -0.0
[6,4,1,2] = -0.0
[6,4,1,3] = -0.0
[6,4,2,:]
[6,4,2,1] = -0.0
[6,4,2,2] = -0.0
[6,4,2,3] = -0.0
[6,4,3,:]
[6,4,3,1] = -0.0
[6,4,3,2] = 0.0
[6,4,3,3] = -0.0
[6,5,:,:]
[6,5,1,:]
[6,5,1,1] = 0.0
[6,5,1,2] = 0.0
[6,5,1,3] = -0.0
[6,5,2,:]
[6,5,2,1] = -0.0
[6,5,2,2] = -0.0
[6,5,2,3] = 1.0
[6,5,3,:]
[6,5,3,1] = 1.0
[6,5,3,2] = 0.9999999999999996
[6,5,3,3] = 0.0
[6,6,:,:]
[6,6,1,:]
[6,6,1,1] = 0.0
[6,6,1,2] = 0.0
[6,6,1,3] = 0.0
[6,6,2,:]
[6,6,2,1] = 0.0
[6,6,2,2] = 0.0
[6,6,2,3] = 0.0
[6,6,3,:]
[6,6,3,1] = 0.0
[6,6,3,2] = 0.0
[6,6,3,3] = 0
.0`
multidimensional-array julia
multidimensional-array julia
edited Mar 28 at 15:20
Soma
asked Mar 27 at 18:19
SomaSoma
1779 bronze badges
1779 bronze badges
1
Can you please specify how you want the data to look like in Excel?
– Bogumił Kamiński
Mar 27 at 18:34
xx x: 4 dimensions: [1,:,:,:] [1,1,:,:] [1,1,1,:] [1,1,1,1] = 0.0 [1,1,1,2] = 0.0 [1,1,1,3] = 0.0 [1,1,2,:] [1,1,2,1] = 0.0 [1,1,2,2] = 0.0 [1,1,2,3] = 0.0
I have this matrix in my code that i=1...6, j=1...6, k=1...3, t=1...3
– Soma
Mar 28 at 13:40
5
Please edit your post to include any additional information you have to your question. Avoid adding this in the comments.
– E_net4
Mar 28 at 14:19
add a comment
|
1
Can you please specify how you want the data to look like in Excel?
– Bogumił Kamiński
Mar 27 at 18:34
xx x: 4 dimensions: [1,:,:,:] [1,1,:,:] [1,1,1,:] [1,1,1,1] = 0.0 [1,1,1,2] = 0.0 [1,1,1,3] = 0.0 [1,1,2,:] [1,1,2,1] = 0.0 [1,1,2,2] = 0.0 [1,1,2,3] = 0.0
I have this matrix in my code that i=1...6, j=1...6, k=1...3, t=1...3
– Soma
Mar 28 at 13:40
5
Please edit your post to include any additional information you have to your question. Avoid adding this in the comments.
– E_net4
Mar 28 at 14:19
1
1
Can you please specify how you want the data to look like in Excel?
– Bogumił Kamiński
Mar 27 at 18:34
Can you please specify how you want the data to look like in Excel?
– Bogumił Kamiński
Mar 27 at 18:34
xx x: 4 dimensions: [1,:,:,:] [1,1,:,:] [1,1,1,:] [1,1,1,1] = 0.0 [1,1,1,2] = 0.0 [1,1,1,3] = 0.0 [1,1,2,:] [1,1,2,1] = 0.0 [1,1,2,2] = 0.0 [1,1,2,3] = 0.0
I have this matrix in my code that i=1...6, j=1...6, k=1...3, t=1...3– Soma
Mar 28 at 13:40
xx x: 4 dimensions: [1,:,:,:] [1,1,:,:] [1,1,1,:] [1,1,1,1] = 0.0 [1,1,1,2] = 0.0 [1,1,1,3] = 0.0 [1,1,2,:] [1,1,2,1] = 0.0 [1,1,2,2] = 0.0 [1,1,2,3] = 0.0
I have this matrix in my code that i=1...6, j=1...6, k=1...3, t=1...3– Soma
Mar 28 at 13:40
5
5
Please edit your post to include any additional information you have to your question. Avoid adding this in the comments.
– E_net4
Mar 28 at 14:19
Please edit your post to include any additional information you have to your question. Avoid adding this in the comments.
– E_net4
Mar 28 at 14:19
add a comment
|
1 Answer
1
active
oldest
votes
You can write it to a .csv file which will be easily imported in an Excel sheet.
Working code for Julia 1.1.0
and JuMP 0.19.0
x = [0.0 for _ in 1:6, _ in 1:6, _ in 1:3, _ in 1:3]
using CSV
using DataFrames
function arr_to_csv(x, outputstring)
df = DataFrame(i = Int[], j = Int[], k = Int[], t = Int[], x = Float64[])
sizes = size(x)
for i in 1:sizes[1]
for j in 1:sizes[2]
for k in 1:sizes[3]
for t in 1:sizes[4]
push!(df, (i, j, k, t, x[i,j,k,t]))
end
end
end
end
df |> CSV.write(outputstring, header = ["i", "j", "k", "t", "value"])
end
arr_to_csv(x, "./4dim-x.csv")
Replace x
with your matrix
It has this error,arr_to_csv(xx, "./4dim-x.csv") ERROR: size (and "end" syntax) not implemented for JuMPArray objects.Use JuMP.size if you want to ac cess the dimensions. Stacktrace: [1] arr_to_csv(::JuMP.JuMPArrayFloat64,4,NTuple4,UnitRangeInt64, ::String) at C:Usersadmin Desktopmodelwithtriangle97.12.25mainnnmodel.juliarc.jl:119 [2] macro expansion at C:UsersadminAppDataLocalJuliaPro-0.6.4.1pkgs-0.6.4.1v0.6Atomsrcrep l.jl:118 [inlined] [3] anonymous at .<missing>:?
it seems, the error is for size function
– Soma
Apr 6 at 5:44
@SomayehEsmaeili This is working on Julia 1.1.0 and JuMP 0.19.0. It might be possible this isn't working for you because you're on a different version. Can you please tell me what are your Julia and JuMP versions ?
– JKHA
Apr 6 at 9:31
it is Julia 0.6.4.1. Thanks for your kindly help.
– Soma
Apr 6 at 11:13
,I cant use excel for my results in this version? should I update the Julia? Thanks
– Soma
Apr 12 at 9:52
It might be a good idea to upgrade Julia ^^
– JKHA
Apr 12 at 21:58
add a comment
|
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55384080%2fhow-can-i-export-multidimensional-matrix-from-julia-in-excel%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can write it to a .csv file which will be easily imported in an Excel sheet.
Working code for Julia 1.1.0
and JuMP 0.19.0
x = [0.0 for _ in 1:6, _ in 1:6, _ in 1:3, _ in 1:3]
using CSV
using DataFrames
function arr_to_csv(x, outputstring)
df = DataFrame(i = Int[], j = Int[], k = Int[], t = Int[], x = Float64[])
sizes = size(x)
for i in 1:sizes[1]
for j in 1:sizes[2]
for k in 1:sizes[3]
for t in 1:sizes[4]
push!(df, (i, j, k, t, x[i,j,k,t]))
end
end
end
end
df |> CSV.write(outputstring, header = ["i", "j", "k", "t", "value"])
end
arr_to_csv(x, "./4dim-x.csv")
Replace x
with your matrix
It has this error,arr_to_csv(xx, "./4dim-x.csv") ERROR: size (and "end" syntax) not implemented for JuMPArray objects.Use JuMP.size if you want to ac cess the dimensions. Stacktrace: [1] arr_to_csv(::JuMP.JuMPArrayFloat64,4,NTuple4,UnitRangeInt64, ::String) at C:Usersadmin Desktopmodelwithtriangle97.12.25mainnnmodel.juliarc.jl:119 [2] macro expansion at C:UsersadminAppDataLocalJuliaPro-0.6.4.1pkgs-0.6.4.1v0.6Atomsrcrep l.jl:118 [inlined] [3] anonymous at .<missing>:?
it seems, the error is for size function
– Soma
Apr 6 at 5:44
@SomayehEsmaeili This is working on Julia 1.1.0 and JuMP 0.19.0. It might be possible this isn't working for you because you're on a different version. Can you please tell me what are your Julia and JuMP versions ?
– JKHA
Apr 6 at 9:31
it is Julia 0.6.4.1. Thanks for your kindly help.
– Soma
Apr 6 at 11:13
,I cant use excel for my results in this version? should I update the Julia? Thanks
– Soma
Apr 12 at 9:52
It might be a good idea to upgrade Julia ^^
– JKHA
Apr 12 at 21:58
add a comment
|
You can write it to a .csv file which will be easily imported in an Excel sheet.
Working code for Julia 1.1.0
and JuMP 0.19.0
x = [0.0 for _ in 1:6, _ in 1:6, _ in 1:3, _ in 1:3]
using CSV
using DataFrames
function arr_to_csv(x, outputstring)
df = DataFrame(i = Int[], j = Int[], k = Int[], t = Int[], x = Float64[])
sizes = size(x)
for i in 1:sizes[1]
for j in 1:sizes[2]
for k in 1:sizes[3]
for t in 1:sizes[4]
push!(df, (i, j, k, t, x[i,j,k,t]))
end
end
end
end
df |> CSV.write(outputstring, header = ["i", "j", "k", "t", "value"])
end
arr_to_csv(x, "./4dim-x.csv")
Replace x
with your matrix
It has this error,arr_to_csv(xx, "./4dim-x.csv") ERROR: size (and "end" syntax) not implemented for JuMPArray objects.Use JuMP.size if you want to ac cess the dimensions. Stacktrace: [1] arr_to_csv(::JuMP.JuMPArrayFloat64,4,NTuple4,UnitRangeInt64, ::String) at C:Usersadmin Desktopmodelwithtriangle97.12.25mainnnmodel.juliarc.jl:119 [2] macro expansion at C:UsersadminAppDataLocalJuliaPro-0.6.4.1pkgs-0.6.4.1v0.6Atomsrcrep l.jl:118 [inlined] [3] anonymous at .<missing>:?
it seems, the error is for size function
– Soma
Apr 6 at 5:44
@SomayehEsmaeili This is working on Julia 1.1.0 and JuMP 0.19.0. It might be possible this isn't working for you because you're on a different version. Can you please tell me what are your Julia and JuMP versions ?
– JKHA
Apr 6 at 9:31
it is Julia 0.6.4.1. Thanks for your kindly help.
– Soma
Apr 6 at 11:13
,I cant use excel for my results in this version? should I update the Julia? Thanks
– Soma
Apr 12 at 9:52
It might be a good idea to upgrade Julia ^^
– JKHA
Apr 12 at 21:58
add a comment
|
You can write it to a .csv file which will be easily imported in an Excel sheet.
Working code for Julia 1.1.0
and JuMP 0.19.0
x = [0.0 for _ in 1:6, _ in 1:6, _ in 1:3, _ in 1:3]
using CSV
using DataFrames
function arr_to_csv(x, outputstring)
df = DataFrame(i = Int[], j = Int[], k = Int[], t = Int[], x = Float64[])
sizes = size(x)
for i in 1:sizes[1]
for j in 1:sizes[2]
for k in 1:sizes[3]
for t in 1:sizes[4]
push!(df, (i, j, k, t, x[i,j,k,t]))
end
end
end
end
df |> CSV.write(outputstring, header = ["i", "j", "k", "t", "value"])
end
arr_to_csv(x, "./4dim-x.csv")
Replace x
with your matrix
You can write it to a .csv file which will be easily imported in an Excel sheet.
Working code for Julia 1.1.0
and JuMP 0.19.0
x = [0.0 for _ in 1:6, _ in 1:6, _ in 1:3, _ in 1:3]
using CSV
using DataFrames
function arr_to_csv(x, outputstring)
df = DataFrame(i = Int[], j = Int[], k = Int[], t = Int[], x = Float64[])
sizes = size(x)
for i in 1:sizes[1]
for j in 1:sizes[2]
for k in 1:sizes[3]
for t in 1:sizes[4]
push!(df, (i, j, k, t, x[i,j,k,t]))
end
end
end
end
df |> CSV.write(outputstring, header = ["i", "j", "k", "t", "value"])
end
arr_to_csv(x, "./4dim-x.csv")
Replace x
with your matrix
edited Apr 6 at 9:32
answered Mar 28 at 14:33
JKHAJKHA
4742 silver badges15 bronze badges
4742 silver badges15 bronze badges
It has this error,arr_to_csv(xx, "./4dim-x.csv") ERROR: size (and "end" syntax) not implemented for JuMPArray objects.Use JuMP.size if you want to ac cess the dimensions. Stacktrace: [1] arr_to_csv(::JuMP.JuMPArrayFloat64,4,NTuple4,UnitRangeInt64, ::String) at C:Usersadmin Desktopmodelwithtriangle97.12.25mainnnmodel.juliarc.jl:119 [2] macro expansion at C:UsersadminAppDataLocalJuliaPro-0.6.4.1pkgs-0.6.4.1v0.6Atomsrcrep l.jl:118 [inlined] [3] anonymous at .<missing>:?
it seems, the error is for size function
– Soma
Apr 6 at 5:44
@SomayehEsmaeili This is working on Julia 1.1.0 and JuMP 0.19.0. It might be possible this isn't working for you because you're on a different version. Can you please tell me what are your Julia and JuMP versions ?
– JKHA
Apr 6 at 9:31
it is Julia 0.6.4.1. Thanks for your kindly help.
– Soma
Apr 6 at 11:13
,I cant use excel for my results in this version? should I update the Julia? Thanks
– Soma
Apr 12 at 9:52
It might be a good idea to upgrade Julia ^^
– JKHA
Apr 12 at 21:58
add a comment
|
It has this error,arr_to_csv(xx, "./4dim-x.csv") ERROR: size (and "end" syntax) not implemented for JuMPArray objects.Use JuMP.size if you want to ac cess the dimensions. Stacktrace: [1] arr_to_csv(::JuMP.JuMPArrayFloat64,4,NTuple4,UnitRangeInt64, ::String) at C:Usersadmin Desktopmodelwithtriangle97.12.25mainnnmodel.juliarc.jl:119 [2] macro expansion at C:UsersadminAppDataLocalJuliaPro-0.6.4.1pkgs-0.6.4.1v0.6Atomsrcrep l.jl:118 [inlined] [3] anonymous at .<missing>:?
it seems, the error is for size function
– Soma
Apr 6 at 5:44
@SomayehEsmaeili This is working on Julia 1.1.0 and JuMP 0.19.0. It might be possible this isn't working for you because you're on a different version. Can you please tell me what are your Julia and JuMP versions ?
– JKHA
Apr 6 at 9:31
it is Julia 0.6.4.1. Thanks for your kindly help.
– Soma
Apr 6 at 11:13
,I cant use excel for my results in this version? should I update the Julia? Thanks
– Soma
Apr 12 at 9:52
It might be a good idea to upgrade Julia ^^
– JKHA
Apr 12 at 21:58
It has this error,
arr_to_csv(xx, "./4dim-x.csv") ERROR: size (and "end" syntax) not implemented for JuMPArray objects.Use JuMP.size if you want to ac cess the dimensions. Stacktrace: [1] arr_to_csv(::JuMP.JuMPArrayFloat64,4,NTuple4,UnitRangeInt64, ::String) at C:Usersadmin Desktopmodelwithtriangle97.12.25mainnnmodel.juliarc.jl:119 [2] macro expansion at C:UsersadminAppDataLocalJuliaPro-0.6.4.1pkgs-0.6.4.1v0.6Atomsrcrep l.jl:118 [inlined] [3] anonymous at .<missing>:?
it seems, the error is for size function– Soma
Apr 6 at 5:44
It has this error,
arr_to_csv(xx, "./4dim-x.csv") ERROR: size (and "end" syntax) not implemented for JuMPArray objects.Use JuMP.size if you want to ac cess the dimensions. Stacktrace: [1] arr_to_csv(::JuMP.JuMPArrayFloat64,4,NTuple4,UnitRangeInt64, ::String) at C:Usersadmin Desktopmodelwithtriangle97.12.25mainnnmodel.juliarc.jl:119 [2] macro expansion at C:UsersadminAppDataLocalJuliaPro-0.6.4.1pkgs-0.6.4.1v0.6Atomsrcrep l.jl:118 [inlined] [3] anonymous at .<missing>:?
it seems, the error is for size function– Soma
Apr 6 at 5:44
@SomayehEsmaeili This is working on Julia 1.1.0 and JuMP 0.19.0. It might be possible this isn't working for you because you're on a different version. Can you please tell me what are your Julia and JuMP versions ?
– JKHA
Apr 6 at 9:31
@SomayehEsmaeili This is working on Julia 1.1.0 and JuMP 0.19.0. It might be possible this isn't working for you because you're on a different version. Can you please tell me what are your Julia and JuMP versions ?
– JKHA
Apr 6 at 9:31
it is Julia 0.6.4.1. Thanks for your kindly help.
– Soma
Apr 6 at 11:13
it is Julia 0.6.4.1. Thanks for your kindly help.
– Soma
Apr 6 at 11:13
,I cant use excel for my results in this version? should I update the Julia? Thanks
– Soma
Apr 12 at 9:52
,I cant use excel for my results in this version? should I update the Julia? Thanks
– Soma
Apr 12 at 9:52
It might be a good idea to upgrade Julia ^^
– JKHA
Apr 12 at 21:58
It might be a good idea to upgrade Julia ^^
– JKHA
Apr 12 at 21:58
add a comment
|
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55384080%2fhow-can-i-export-multidimensional-matrix-from-julia-in-excel%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Can you please specify how you want the data to look like in Excel?
– Bogumił Kamiński
Mar 27 at 18:34
xx x: 4 dimensions: [1,:,:,:] [1,1,:,:] [1,1,1,:] [1,1,1,1] = 0.0 [1,1,1,2] = 0.0 [1,1,1,3] = 0.0 [1,1,2,:] [1,1,2,1] = 0.0 [1,1,2,2] = 0.0 [1,1,2,3] = 0.0
I have this matrix in my code that i=1...6, j=1...6, k=1...3, t=1...3– Soma
Mar 28 at 13:40
5
Please edit your post to include any additional information you have to your question. Avoid adding this in the comments.
– E_net4
Mar 28 at 14:19