7k views

### Flatten command: matrix as second argument

One thing I could never wrap my head around is how Flatten works when provided with a matrix as the second argument, and the Mathematica help isn't particularly ...
• 14.9k
3k views

### Transpose uneven lists

Is there a quick method to transpose uneven lists without conditionals? With: Drop[Table[q, {10}], #] & /@ Range[10] Thus the first list would have the ...
1k views

### Implementation of MATLAB's "numgrid" function [closed]

I am looking for an implementation of MATLAB's numgrid function, in particular the "B" mode. For example, I want to get the matrix corresponding to the ...
• 7,843
3k views

### Reshape vectors exactly like in MATLAB

This gives a 64×1 column vector in Mathematica: ...
• 273
3k views

### Any solution to transfer data between Python and Mathematica

I think Mathematica handles .mat file not very well, python is pretty good at this kind of jobs. In this site, there are plenty of question related to calling Mathematica from Python, or calling ...
• 2,571
7k views

### How do I export matrices into matlab format?

For example: ...
• 2,325
828 views

How to calculate Numerical gradient of 2D arrays using the "gradient function" ("Matlab-like")? "[___] = gradient(F,hx,hy,...,hN) specifies N spacing parameters for the ...
• 1,856
4k views

### Importing data from a MATLAB file to MATHEMATICA [closed]

I have been trying to import some matrices from MATLAB to MATHEMATICA. The matrices are the output after I run the MATLAB file. I had saved that file in .MAT format and trying to import it in ...
4k views

### How to import columns of data (.mat file)

I have a two 100x2 .mat file and I would like to get the elements stored as pairwise entries i.e. something like data = [{a1,b1},{a2,b2}..{a100,b100}]. Can someone help me do this efficiently?
• 259
487 views

### How to implement a Kalman or LQG regulator in the control of classical pendulum problem

My final purpose is to realize an LQG control of inverted pendulum. To this end, my first step I think is to build a Kalman regulator in Mathematica. The original Matlab version of Kalman filter is ...
• 1,401
960 views

### Mathematica does not import .mat file correctly [closed]

I have .mat file that contains a binary (0,1) matrix with size 100*100*100. I have used this syntax to import it in mathematica ...
• 2,026
1 vote
319 views

### How to find the analytical or numerical solution of a system of partial differential equations?

I am trying to use mathematica to solve a system of second-order partial differential equations, but I have been unable to solve it. The code of mathematica is as follows: ...
I would like to create an $m \times n$-table A with entries Ai_j, where $1 \leq i \leq m$ and $1 \leq j \leq n$. I have seen ...