You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
Create a 4D array from 3D array with 3 columns, and 1D (row only) array with 3 columns
9 views (last 30 days)
Show older comments
When I load a test data file, Matlab tells me it has 4 dimensions, and when I check size, I see:
>> size(myVar)
ans =
3 241 161 161
'3' because I think the variable contains a 3D array.
'241 161 161' because the variable also contain a 1D array that has one row with three columns.
(Or '241 161 161' could mean there are three, 1D arrays with one column in each? I don't know how to check.)
Either way, I know that 241, 161, 161 is the dimension of a space in a 3D grid-like structure.
I want to create a .mat file with similar structure from the following two arrays:
1st array:
I have a 3D array, with size {576 3 4}, it looks something like,
(:,:,1) =
-0.0336 0.6440 -0.1464
-0.0336 0.6441 -0.1467
...... ....... .......
576 rows.
Also similar structure for (:,:,2), (:,:,3) and (:,:,4).
2nd array:
1D, row-only array with three columns
L = [ 100 100 100];
How do I create a 4D variable that has data from arr1 and arr2, and looks like what I wrote in the beginning?
My guess is its size would look like '3 100 100 100'.
The .mat creating part is the easy part:
save('myFile.mat','4D_var');
But I don't know how to create that 4D_var.
Thank you.
4 Comments
Matt J
on 15 Jan 2024
Edited: Matt J
on 15 Jan 2024
'3' because I think the variable contains a 3D array.
'241 161 161' because the variable also contain a 1D array that has one row with three columns.
No, neither are true. If the size(myVar) reports [3 241 161 161]. It is because it contains one array only, which is a 4D array of dimension 3x241x161x161. Accordingly, the number of elements myVar holds contains is,
numElements=3*241*161*161
Jartok
on 15 Jan 2024
Edited: Jartok
on 15 Jan 2024
Matt, thank you for your comments.
I still do not have a clear idea.
Nx = length(myVar(1,:,1,1)); gives 241
Ny = length(myVar(1,1,:,1)); gives 161,
Nz = length(myVar(1,1,1,:)); gives 161.
So, could it be that myVar has 4 arrays inside it,
and,
1st array has 3 rows,
2nd array has 241 rows,
3rd array has 161 rows,
4th array also has 161 rows?
If that is true, how to find out how many columns are in each array?
Or are they (each) just 1D column arrays?
I am asking this because I want to create a 4D variable.
My inputs are a 3D array of size {576 3 4}.
I also need to pass 3 numbers {100, 100, 100}.
(In my example (myVar), they are 241, 161, 161. But those are simulated data for testing.)
These numbers are to tell a Matlab program to make a grid space of 100x100x100 units.
The Matlab program has cubic grids inside that volume, each cube's dimenstion is hard corded in the program.
My 3D array of size {576 3 4} has x,y,z values for each vertex of the cube.
I got a program from someone else, and trying to understand how to pass a 4D variable.
Matt J
on 15 Jan 2024
Edited: Matt J
on 15 Jan 2024
Nx = length(myVar(1,:,1,1)); gives 241 ... So, could it be that myVar has 4 arrays inside it?
No.
What would you say about myVar(2,:,3,5)? You will see that length(myVar(2,:,3,5)) is also 241. Wouldn't that imply, by your reasoning, that myVar also contains a 5th array which is not in your list above and which also has 241 "rows"?
More generally, you will see that any myVar(i,:,j,k) gives a different length-241 vector for any combination of (i,j,k). There are many more than 4 such combinations.
Jartok
on 15 Jan 2024
Ok, I got your point about the "more generally,... " part.
Thanks.
Can you please give me some hints on how would I go about creating a 4D variable with the inputs mentioned above? (After "my inputs are 3D array of size..."
Accepted Answer
Matt J
on 15 Jan 2024
Edited: Matt J
on 15 Jan 2024
How do I create a 4D variable that has data from arr1 and arr2, and looks like what I wrote in the beginning? My guess is its size would look like '3 100 100 100'.
I don't see what arr1 has to do with anything, but the following might be the "grid space" you're trying to construct,
L=[100,100,100];
[X,Y,Z]=ndgrid( 1:L(1) , 1:L(2) , 1:L(3) );
grid_space=permute(cat(4, X,Y,Z) ,[4,1,2,3] );
size(grid_space)
ans = 1×4
3 100 100 100
24 Comments
Jartok
on 16 Jan 2024
Edited: Jartok
on 16 Jan 2024
Thank you for the code. Now at least I have something to work on.
You wrote "what arr1 has anything to with... "
I didn't explain everything at the beginning. My apologies.
I need to pass coordinate (x, y, z) values (I have an 3D array with x, y, z values), and the total grid dimension (the "100x100x100" in the example above) to a Matlab program in the form of a 4D variable.
I also need to pass magentic field values (Bx, By, Bz) and the total grid size. The field values are also in 3D array, and total grid size is "100x100x100" as well.
Each node of a grid (it's a cube, by the way) has some "node index", and some associated (x, y, z) coordinate, and corresponding magnetic field values (Bx, By, Bz).
Jartok
on 16 Jan 2024
Edited: Jartok
on 16 Jan 2024
After reading the data file that has xyz variable (I named it 'myVar' in my example, but it's the same thing) , I extracted a few lines. They are x, y, z coordinates.
Since this is test data, I need to pass my own x, y, z data which is in the form of a 3D array, with size [576 3 4].
Jartok
on 16 Jan 2024
Edited: Jartok
on 16 Jan 2024
I didn't phrase my explanation well, Let me explain.
They are different datasets.
The posted image is from a test data, whose size is 3x241x161x161, as mentioned in the very beginning.
The variable name of that test data is 'xyz'- (I used myVar at the beginning of the post, sorry for the inconsistency.)
In the image, we see just a snippet: the '5' in 3x5x2 is because I took the 1:5 slice in the second dimension.
The '2' in 3x5x2 is because of the 1:2 slice in the third dimension.
At least that's how I have understand in the last few days.
****
My own data (that has x, y, z coordinate values) - that I called 'arr1' above, the one I am trying to create a 4D variable with, has a size 576x3x4.
The 4D variable needs to have the 3D array (that has x, y, z coordinate values), as well as total grid dimension (100x100x100).
In the Matlab file that expects the 4D variable, I can then extract the grid dimension like this:
Nx=length(xyz(1,:,1,1))-1;
Ny=length(xyz(1,1,:,1))-1;
Nz=length(xyz(1,1,1,:))-1;
Nx, Ny, Nz are the grid length in x, y, z direction. They will have values of 99, 99, 99.
The purpose of the posted image was to show that the 4D variable has 3D data inside it. This is because of this: (mentioned in the previous comment as well)
Each node of a grid (it's a cube) has some "node index", and some associated (x, y, z) coordinate, and corresponding magnetic field values (Bx, By, Bz).
The node index is calculated inside the Matlab file, using the total grid dimension (99 x 99 x 99) and individual grid size. The x, y, z coordinate values, and corresponding magnetic field values need to be passed through a 4D variable. The x, y, z coordinate values, and corresponding magnetic field values will be in two different variables.
(1) One 4D variable will have a 3D array (that has x, y, z coordinate values), and total grid dimension (100 x 100 x 100).
(2) The other One 4D variable will have a 3D array (that has magnetic field values), and total grid dimension (100 x 100 x 100).
Then I will create two .mat files (for (1) and (2)).
The Matlab program that has grids to do some processing will then read those .mat files, and extract the 4D variables.
Stephen23
on 16 Jan 2024
Rather than creating (potentially) large intermediate arrays just to measure the size of an array dimension:
length(xyz(1,:,1,1))
you should just call SIZE with its optional DIM input:
size(xyz,2)
You could even get all three in a vector like this:
size(xyz,2:4)
Using SIZE will be simpler and more efficient than creating intermediate arrays that simply get discarded.
Matt J
on 16 Jan 2024
Edited: Matt J
on 16 Jan 2024
(1) One 4D variable will have a 3D array (that has x, y, z coordinate values), and total grid dimension (100 x 100 x 100).
@Jar If your original xyz array is 3x241x161x161, that means it will contain 1870883 elements
3*241*161*161
ans = 18740883
Now, you say you want the array to be re-organized or transformed somehow into a 100x100x100 array which would contain only 1 million elements. You haven't explained precisely what transformation of xyz is supposed to occur that leads to a reduction in the total number of elements in the final array. Are you trying to do some sort of interpolation?
Matt J
on 16 Jan 2024
It might help if you post an image of the scatter plot,
scatter3(xyz(1,:), xyz(2,:), xyz(3,:))
so we can see how the xyz triplets are distributed in space.
Matt J
on 16 Jan 2024
It's impossible to see any details. Do they form an equi-spaced lattice of points?
Additionally, you said that you had Bx field values associated with each point, which would mean your Bx variable is currently a 241x161x161 array. You say that this is supposed to turn into a 100x100x100 array. But how? Do you simply want to resize it via interpolation? If so, you can use imresize3, e.g.,
Bx=rand(241,161,161);
Bx_new=imresize3(Bx,[100,100,100]);
whos Bx Bx_new
Name Size Bytes Class Attributes
Bx 241x161x161 49975688 double
Bx_new 100x100x100 8000000 double
Jartok
on 17 Jan 2024
Edited: Jartok
on 17 Jan 2024
- First off, I appreciate your follow-up. Thank you.
- Second, I could have done a better job explaining, and also naming the variables. Let me try to explain what I know or what I think I know.
- I have a test data file (.mat file) that contains simulated data, received from somewhere. I don't know what went into its making, or how it was created. When I load that file into Matlab, I can see that the variable name is 'xyz' and its size is 3x241x161x161, a 4D variable as we have been discussing.
- I also have another test data file, that has simulated magentic field data. Exact similar structure (3x241x161x161), only the variable name is different ('field'). Below, let me explain about 'xyz'.
- A note that came along with the test data file says that the first dimention of the 'xyz' variable has values for x, y, z coordinates, this I could also confirm as shown in the image snippet I posted earlier. The 2nd, 3rd and the 4th dimension of 'xyz' are the dimension of a region of space where cubic grids are created.
- My understanding is that first, the program constructs a region of space of 241x161x161 grid-units.Then the program creates grids (cubes). The note also mentions that a fixed grid-size of 0.25 has been used, so, for example, for the test data, there will be 241/0.25 = 964 cubic grids, 161/0.25 = 644 cubic grids and again 644 cubic grids along the x, y and z direction.
- Now that was with the simulated data.
- Next, I want to use my own data, real data (in the sense of "not-simulated"). I have two sets of data, (i) a 3D array of size 576x3x4 for x,y,z coordinate values, and (ii) another same size 3D array for magnetic field (Bx, By, Bz) values. For my own data, I wanted to create a region of space that is 100x100x100 grid units, and say, I will use the same grid size of 0.25. So you see, the total grid space dimension is not fixed. For simulated data, it happend to be 241x161x161, for my own data, I wanted to use 100x100x100. Actually, the total grid dimension will be calculated by the min and max values in each (x, y, z) column, but it complicates the explanation, so for now, I wanted to use 100x100x100.
- I will use a different name for my variable from now on. I want to create, say a 'myXYZ' variable that has x,y,z coordinate values of size 576x3x4 in its 1st dimension, and 100, 100, 100 in its 2nd, 3rd and the 4th dimension.
- Once I know how to create 'myXYZ', I will create 'myFIELD' variable similarly.
Matt J
on 17 Jan 2024
Edited: Matt J
on 17 Jan 2024
I want to create, say a 'myXYZ' variable that has x, y, z coordinate values of size 576x3x4 in its 1st dimension, and 100, 100, 100 in its 2nd, 3rd and the 4th dimension.
That part is totally unclear. What will be size(myXYZ) of the final result myXYZ? You should be able to use the rand() function to generate a fake version of myXYZ to demonstrate the shape you want. So show us, with rand(), how you would create a variable of the desired size.
Will it be 576x3x4x100x100x100? Like in,
myVar = rand(576,3,4,100,100,100)
Note that such an array would be 6D, not 4D and would consume 25 GB of memory in single floats.
Jartok
on 17 Jan 2024
Edited: Jartok
on 17 Jan 2024
I may have mixed what are facts (or what I think are facts), and what are my interpretation, which are of course still developing as I am learning more with these interactions.
What I know for sure is that my Matlab program needs a 4D variable, not 6D.
After I load the test data file, I can see var name 'xyz' and value '4D', in a small window-like structure on the left bottom of my Matlab. Also, In the case of the test variable 'xyz', when I do size(xyz), the output is '3x241x161x161'.So it is a 4D variable, and I want to create a 4D variable.
So, let's get that out of way.
Through the snippet I posted earlier, I can guess that the xyz variable also has x,y,z coordinate values. My guess is that they are from a 3D array. I do not know the test data's array size (simulated dataset's array dimension), or how this 3D array (if it was a 3D array) data was put into the 4D variable.
The '241x161x161' part in the xyz variable, I was told they are total grid space dimension, used to construct cubic grids. For now, I am assuming they are.
Now, that was the simulated data part.
Next, I also know that my own x,y,z coordinate data is a 3D array, with size 576x3x4. Along with that 3D array data, I want to pass the dimension of a volume needed to create cubic grids. For now, I want to pass 100, 100, 100 in the 2nd, 3rd and the 4th dimension, so that I can extract the total volume's dimension later on, like,
length(myXYZ(1,:,1,1)) for the total length of grid-space on the x-axis,
length(myXYZ(1,1,:,1)) for the total length of grid-space on the y-axis,
length(myXYZ(1,1,1,:)) for the total length of grid-space on the z-axis.
Stephen23
on 17 Jan 2024
Edited: Stephen23
on 17 Jan 2024
"For my own data, I wanted to create a region of space that is 100x100x100 grid units, and say, I will use the same grid size of 0.25. So you see, the total grid space dimension is not fixed. For simulated data, it happend to be 241x161x161, for my own data, I wanted to use 100x100x100."
myXYZ = myVar(:,1:100,1:100,1:100)
Jartok
on 17 Jan 2024
I am sorry, I do not understand.
First, let me use my own variable name (in the recent posts, I am calling it myXYZ) because 'myVar' was meant for test data.
How would I create a 4D myXYZ variable which incorporates a 3D array, and grid space dimension (100x100x100)?
Could you please elaborate on your code? (I can't use myVar, it is for test) I need to create my own variable, with my own 3D data.
On my end, I tried the following:
Error says:
Stephen23
on 17 Jan 2024
"I need to create my own variable, with my own 3D data."
Based on your screenshot you have
576*3*4
ans = 6912
data points. How do you expect to fit those into
100*100*100
ans = 1000000
array elements?
Jartok
on 17 Jan 2024
That was my attempt to create a 4D variable that contains my 3D data, and some other info (total grid dimension, 100x100x100), based on my understanding of the structure of a 4D variable from my test data.
Obviously, I have not understood that data structure that goes into making of that test data file.
Matt J
on 17 Jan 2024
Edited: Matt J
on 17 Jan 2024
@Jar What you misunderstand is what happens when you index into a multi-dimensional array. Observe what happens when we apply the size() command to your expressions,
myXYZ=zeros(3,100,100,100);
my3D=ones(576,3,4);
size(myXYZ(1,:,:,:))
ans = 1×4
1 100 100 100
size(my3D)
ans = 1×3
576 3 4
As you can see, the region you reference with the indexing expression myXYZ(1,:,:,:) is a smaller array of size 1x100x100x100 while my3D has a completely different size 576x3x4. There is therefore no way my3D can occupy the region of myXYZ you have indexed. In fact, there is no region within myXYZ where a 576x3x4 array like my3D can be inserted because all dimensions of myXYZ are smaller than 576.
Here is one example of what could work,
myXYZ=zeros(576,3,4,100);
my3D = ones(576,3,4);
size(myXYZ(:,:,:,1)) %The same size as my3D
ans = 1×3
576 3 4
myXYZ(:,:,:,1)=my3D;
but understand that this is only 1 out of 100 locations where my3D could have been inserted. I could have also inserted my3D as follows,
myXYZ(:,:,:,2)=my3D;
myXYZ(:,:,:,3)=my3D;
...
myXYZ(:,:,:,100)=my3D;
Jartok
on 17 Jan 2024
Edited: Jartok
on 17 Jan 2024
@Matt J Thank you for the illustration.
Still, I do not see the solution any near.
Allow me to frame a question again. And please correct me if I have understood incorrectly.
Let me again start at the beginning: size (xyz) shows 3x241x161x161.
That is, the lengths of the 1st, 2nd, 3rd, 4th dimensions are 3, 241, 161, 161 respectively.
Would it be correct to say that this 3x241x161x161 size means there are {161 pages of 3 rows x 241 columns}, and there are 161 pages of that 3D data (of size 3 x 241 x 161)?
I know that the "241, 161, 161" part is used inside the program to calculate Nx, Ny, Nz (I have already mentioned this earlier), they in turn are used to create grid space.
Assuming myXYZ is a 4D variable I am trying to create, let me mention two constraints:
(1) I want to use length(myXYZ(1,:,1,1)), length(myXYZ(1,1,:,1)), length(myXYZ(1,1,1,:)) to get some integers. I have been using 100, 100, 100 as an example, but it could be any positive integer. I need them to create grid space.
(2) When creating myXYZ, I need to make sure that the first dimension of myXYZ contains a 3D array. This is because the Matlab program I am trying to use expects a 3D array in the first dimension. Let's just pass a 3D array of arbitrary size to the first dimension.
Here is a sample code to show why I want to have a 3D array at the first dimension of myXYZ.
cube(:,1)=myXYZ(:,i,j,k);
cube(:,2)=myXYZ(:,i+1,j,k);
cube(:,3)=myXYZ(:,i+1,j,k+1);
cube(:,4)=myXYZ(:,i,j,k+1);
cube(:,5)=myXYZ(:,i,j+1,k);
cube(:,6)=myXYZ(:,i+1,j+1,k);
cube(:,7)=myXYZ(:,i+1,j+1,k+1);
cube(:,8)=myXYZ(:,i,j+1,k+1);
Do not mind about i, j, k for now. But I hope you will agree that this program needs a 3D array at the first dimension.
Given these two constrains, how would you create myXYZ?
Matt J
on 17 Jan 2024
Edited: Matt J
on 17 Jan 2024
Would it be correct to say that this 3x241x161x161 size means there are {161 pages of 3 rows x 241 columns}, and there are 161 pages of that 3D data (of size 3 x 241 x 161)?
Yes.
But I hope you will agree that this program needs a 3D array at the first dimension.
No. First of all, I don't know what it means to "have a 3D array at the first dimension". That is not intelligble English. Secondly, none of the steps in the code you've shown involve 3D arrays.
You've introduced a new variable called "cube" without telling us anything about it, but I will assume it is an Mx8 array. Similarly, I will assume that myXYZ is a 4D array of size MxNxPxQ. If we look at the first assignment statement,
cube(:,1)=myXYZ(:,i,j,k);
The left hand side cube(:,1) is 1D vector of size Mx1, so it is not 3D. You can verify that with the size() command
The right hand side myXYZ(:,i,j,k) will also be a vector of size Mx1, and so is also not 3D.
The assignment statement works because the left and right hand side both refer to data chunks that are the same size, but none of these chunks are 3D. The same is true in all subsequent lines.
Jartok
on 17 Jan 2024
Edited: Jartok
on 17 Jan 2024
I don't know what it means to "have a 3D array at the first dimension". That is not intelligble English.
I meant, I assumed that when the xyz variable was created, a 3D array was assigned to the first dimenstion of xyz.
My coordinate array has 3D structure, so I assumed the simulated data's coordinate array also had 3D structure.
If I could find the dimenstion of the x,y,z coordinate array that went into creating the 4D variable xyz, maybe I could modify my 3D data structure and put that into myXYZ variable.
Matt J
on 17 Jan 2024
Edited: Matt J
on 17 Jan 2024
Here is another possible interpretation of what you are trying to do. Suppose you are given ranges of x,y, and z values that span a rectangular 3D region, e.g.,
xrange=[-1.7, +1.7];
yrange=[-3.6, +3.6];
zrange=[-2.0, +2.0];
Now, suppose we want to create a series of x,y,z node locations that evenly sample this region at 10 points in each dimension. You could do so as follows.
[X,Y,Z]=ndgrid(linspace(xrange(1), xrange(2),10),...
linspace(yrange(1), yrange(2),10),...
linspace(zrange(1), zrange(2),10));
myXYZ=permute(cat(4, X,Y,Z),[4,1,2,3]);
Notice that this array has size,
size(myXYZ)
ans = 1×4
3 10 10 10
The first dimension is 3, which I think is what you really mean by "assign a 3D array to the first dimension".
Also, we can make a scatter plot of these grid points as follows:
scatter3( myXYZ(1,:) , myXYZ(2,:) , myXYZ(3,:) ,'r' ,'filled','MarkerFaceAlpha',0.4);
xlabel X; ylabel Y; zlabel Z
More Answers (2)
Sulaymon Eshkabilov
on 15 Jan 2024
If understood correctly, this is what you are trying to get, e.g.:
rng(13) % for reproducibility
A = rand(5, 3);
size(A)
ans = 1×2
5 3
% B and C have the same size as A
B = rand(5, 3);
C = rand(5, 3);
L(:,:, 1) = A;
L(:,:, 2) = B;
L(:,:, 3) = C;
size(L)
ans = 1×3
5 3 3
% D array
D = rand(5, 3)
D = 5×3
0.2530 0.6861 0.1518
0.3793 0.5483 0.9260
0.6045 0.1380 0.6801
0.7724 0.0988 0.2377
0.0679 0.2456 0.5689
L(:,:,4) = D;
% Final 4-D array
[Row, Col, Layer]=size(L)
Row = 5
Col = 3
Layer = 4
L
L =
L(:,:,1) =
0.7777 0.4534 0.0350
0.2375 0.6090 0.2984
0.8243 0.7755 0.0585
0.9657 0.6416 0.8571
0.9726 0.7220 0.3729
L(:,:,2) =
0.6798 0.9491 0.0651
0.2563 0.2179 0.6298
0.3476 0.3194 0.8738
0.0094 0.9178 0.0087
0.3583 0.0319 0.7466
L(:,:,3) =
0.8128 0.9556 0.2770
0.0757 0.0000 0.6954
0.6565 0.2470 0.9186
0.5093 0.7122 0.2445
0.4799 0.3246 0.4581
L(:,:,4) =
0.2530 0.6861 0.1518
0.3793 0.5483 0.9260
0.6045 0.1380 0.6801
0.7724 0.0988 0.2377
0.0679 0.2456 0.5689
1 Comment
Jartok
on 15 Jan 2024
Thank you, SE, for creating sample code.
Which one is the 4D array?
I did size(L), which gives me
ans =
5 3 4
Which is not a 4D array.
Catalytic
on 17 Jan 2024
Edited: Catalytic
on 17 Jan 2024
So, could it be that myVar has 4 arrays inside it
To me, it doesn't sound like you are talking about a 4D array at all, but instead a cell array. A cell array is a variable that can have "4 arrays inside it", for example:
xyz=rand(576,3,4);
Bx=rand(100,100,100);
By=rand(100,100,100);
Bz=rand(100,100,100);
whos xyz Bx By Bz
Name Size Bytes Class Attributes
Bx 100x100x100 8000000 double
By 100x100x100 8000000 double
Bz 100x100x100 8000000 double
xyz 576x3x4 55296 double
myVar={ xyz, Bx,By,Bz}
myVar = 1×4 cell array
{576×3×4 double} {100×100×100 double} {100×100×100 double} {100×100×100 double}
Here the first array is a 3D array of dimension 576x3x4 and the second,third, and fourth arrays are each 100x100x100
size(myVar{1})
ans = 1×3
576 3 4
size(myVar{2})
ans = 1×3
100 100 100
size(myVar{3})
ans = 1×3
100 100 100
size(myVar{4})
ans = 1×3
100 100 100
2 Comments
Jartok
on 17 Jan 2024
Thank you for your comments.
But no, no the 'xyz' variable (or 'myVar' that I mentioned at the beginning) is indeed a 4D variable.
Jartok
on 17 Jan 2024
You asked: Do they form an equi-spaced lattice of points?
Maybe you already read my comments, but in that volume of space (in the test data case, a volume of 240x160x160, in my own case, I wanted it to be 100x100x100, to begin with, will adjust later if necessary), the program will create little cubic grids (with each grid size of 0.25).
My understanding is that each node of a cube has a "node index", and some associated (x,y,z) coordinate, and corresponding magnetic field values (Bx,By,Bz).
I am making it up as I am typing- that maxium value of node index in x,y and z-direction are 241, 161, 161.
I am probably mixing terminology, but that's what I meant by volume dimension, or total grid dimension in my earlier comments.
See Also
Categories
Find more on Inputs in Help Center and File Exchange
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)