Domanda

Contour plot with function triplot
Hi all, I have a script which plots a structure: clear; clc; clf; % nodal coordinates. coord = [0 0; 1 0; 2 0; 3...

oltre 6 anni fa | 0 risposte | 0

### 0

risposte

Domanda

Efficient way of storing a triangular matrix
Hi all, I have some pretty large upper triangular matrices to store and to be used like this: <</matlabcentral/answers/upl...

oltre 6 anni fa | 2 risposte | 1

### 2

risposte

Domanda

Hi all, Is there a way to add comments to variables dynamically? For example, in my code, if I type this variable in command ...

oltre 6 anni fa | 5 risposte | 5

### 5

risposte

Domanda

Sort cell elements according to one column
Hi all, I have a cell array like this: K>> err err = 3×6 cell array [1] [ 1] [] [] [31×31 do...

oltre 6 anni fa | 1 risposta | 0

### 1

risposta

Domanda

Good method to store pyramid shaped cell array?
Hi all, I need to store some matrices in a cell, say I have 4 matrices: e1, e2, e3, e4, I need to compute the product of the ...

oltre 6 anni fa | 2 risposte | 0

### 2

risposte

Domanda

Cellfun not working for cells contain cells?
Hi all, I have a cell like this K>> respCol respCol = 1×24 cell array Columns 1 through 5 {3×1 cell}...

oltre 6 anni fa | 1 risposta | 0

### 1

risposta

Domanda

Sum over cell array of sparse matrices error: Dimension for sparse matrix concatenation must be <= 2.
Hi all, I have a cell contains sparse matrices, K>> a a = 2×1 cell array [12×12 double] [12×12 do...

oltre 6 anni fa | 1 risposta | 0

### 1

risposta

Domanda

A function with 2 inputs, how to make it accept a 2-by-1 array as an input?
Hi all, There are some functions which accepts 2 inputs, such as inpolygon. For example: K>> xv xv = 1 ...

oltre 6 anni fa | 1 risposta | 0

### 1

risposta

Domanda

Function poly2cw not working?
Hi all, Matlab says: [x2, y2] = poly2cw(x1, y1) arranges the vertices in the polygonal contour (x1, y1) in clockwise or...

oltre 6 anni fa | 1 risposta | 0

### 1

risposta

Domanda

A function smart enough to sort coordinates of block into sub-blocks?
Hi all, Imagine there is a 2D shape made of randomly distributed square blocks, with Cartesian coordinates like this: <</m...

oltre 6 anni fa | 1 risposta | 0

### 1

risposta

Domanda

Group 3 * 3 (2d) or 3 * 3 * 3 (3d) coordinates into square blocks?
Hi all, This question might be quite complex. Imagine there is a 3D block like this with the Cartesian coordinates: <</mat...

oltre 6 anni fa | 1 risposta | 1

### 1

risposta

Domanda

How to combine multiple output from a function into 1?
Hi all, There are some functions in Matlab which gives multiple outputs, such as: K>> [x, y, z] = ndgrid(-1:0, -1:0, -1:...

oltre 6 anni fa | 1 risposta | 0

### 1

risposta

Domanda

Generate n-dimensional array: problem with 1D
Hi all, Imagine I'd like to generate random dimensional zeros matrix, I can do: K>> zeros(2, 2) ans = 0 ...

oltre 6 anni fa | 1 risposta | 0

### 1

risposta

Domanda

Dimensional problem in for loop.
Hi all, Imagine there is function which takes a matrix as input, perform some operations to each element, and gives an output...

oltre 6 anni fa | 1 risposta | 0

### 1

risposta

Domanda

How to index a matrix with existing array?
Hi all, Imagine there is a m by m matrix, I'd like to extract the [p, q] element, while [p, q] is the output of some calculat...

oltre 6 anni fa | 2 risposte | 1

### 2

risposte

Domanda

Sum over cell array of sparse matrices error: Dimension for sparse matrix concatenation must be <= 2.
Hi all, I have a cell contains sparse matrices, K>> a a = 2×1 cell array [12×12 double] [12×12 do...

oltre 6 anni fa | 1 risposta | 0

### 1

risposta

Domanda

How to find combination of random number of vectors?
Hi all, Function combvec gives the combination of n vectors. Imagine I have a cell C contains m vectors, how can I find combi...

oltre 6 anni fa | 1 risposta | 0

### 1

risposta

Domanda

How to change the double percent code section color?
Hi all, As we all know, %% indicates a code section in Matlab. When I put cursor on the section, the section background turns...

oltre 6 anni fa | 1 risposta | 0

### 1

risposta

Domanda

Is there a way to change default editor font and background color?

oltre 6 anni fa | 1 risposta | 0

### 1

risposta

Domanda

How to remove axis from a sparsity plot with spy function?
Hello, I plot the sparsity of a matrix with spy, like this: a = rand(5, 2); spy(a) So it comes with x and y axis, ...

oltre 6 anni fa | 1 risposta | 0

### 1

risposta

Risposto
Is it possible to find connectivity of part of a FE mesh with only nodal information?
I solved it. Create an zero array where the indices represent the nodal numbers, set the nodal numbers of inclusions to 1. ...

oltre 6 anni fa | 0

| accettato

Domanda

Is it possible to find connectivity of part of a FE mesh with only nodal information?
Hi all, Imagine there is a FE mesh with 2 inclusions: <</matlabcentral/answers/uploaded_files/89672/mesh.png>> I know th...

oltre 6 anni fa | 1 risposta | 0

### 1

risposta

Domanda

Structure mesh: plot different regions with different colors
Hi all, I have a 2D mesh with different regions, like this: <</matlabcentral/answers/uploaded_files/89152/CantileverBeam....

oltre 6 anni fa | 1 risposta | 0

### 1

risposta

Domanda

How to create readable files from Matlab to Paraview to display structural deformation?
Hello, I'm really new to Paraview, I'd like to create a plot in Paraview showing the displacement of a rectangular mesh. I u...

oltre 6 anni fa | 1 risposta | 1

### 1

risposta

Domanda

What's the truncation error in SVD?
Hi all, I'm trying to prove one thing: perform SVD on matrix a, the truncation error of singular values equals to truncation...

oltre 6 anni fa | 1 risposta | 0

### 1

risposta

Domanda

How to ensure text on plot always in front?
Hi all, I plot some surfaces and label some points on the surface with it's value of z-axis, as shown on the figure. You can ...

oltre 6 anni fa | 1 risposta | 0

### 1

risposta

Domanda

Multidimensional array: how to extract several dimensions at same time?
Hi all, Imagine there is a 4d array like this: arrayA = rand(5, 4, 3, 2); Now I need a new arrayB which contains all ...

quasi 7 anni fa | 1 risposta | 0

### 1

risposta

Domanda

Make Lagrange interpolation function faster?
Hi all, I coded a Lagrange interpolation function for matrices, and calls it in my main program. only 4 points linear interpo...

quasi 8 anni fa | 0 risposte | 0

### 0

risposte

Domanda

How to determine blocks in mesh grid?
Hello guys, I have a matrix representing a grid, say A = [-1 -1; -1 1; 1 -1; 1 1; -1 0; 0 -1; 0 0; 0 1; 1 0]; Every ...

circa 8 anni fa | 1 risposta | 0

### 1

risposta

Domanda

Is there a rectangular domain decomposition function in MATLAB?
Hello guys, Is there a rectangular domain decomposition function in MATLAB? For example, decompose a rectangular domain into ...

circa 8 anni fa | 0 risposte | 0

risposte