Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
6 votes
1 answer
293 views

C++ Eigen/Mex function to perform two pagewise convolutions on a 3D matrix with a simple kernel

I am trying to accelerate an algorithm where I am computing a 2D variance of many complex matrices stored as pages of a 3D array in Matlab. My implementation uses a Mex function with the C++ Matlab ...
drakon101's user avatar
  • 417
1 vote
1 answer
425 views

Calculate distances between two multi-dimensional arrays in Matlab

In question "Dictionary based non-local mean implementation in Matlab", the Manhattan distance between two three-dimensional structures can be calculated by ...
JimmyHu's user avatar
  • 7,393
3 votes
1 answer
173 views

Dictionary based non-local mean implementation in Matlab

Given a dictionary including multiple X-Y pairs where X, Y are both three dimensional structure. dictionaryBasedNonlocalMean function returns a ...
JimmyHu's user avatar
  • 7,393
3 votes
1 answer
152 views

Three-dimensional DCT spatial frequency components illustration

I am attempting to make three-dimensional discrete cosine transformation spatial frequency components illustration. The 3D cubes is used to present the level of each coefficient. The more bright the ...
JimmyHu's user avatar
  • 7,393
4 votes
1 answer
220 views

Parallel 3D Discrete Cosine Transformation Implementation in Matlab

I am trying to implement 3D Discrete Cosine Transformation calculation in Matlab with parallel computing parfor. The formula of 3D Discrete Cosine Transformation is ...
JimmyHu's user avatar
  • 7,393
1 vote
1 answer
59 views

GetNeighborhood function for 3D cells structure in MATLAB

I am attempting to implement a GetNeighborhood function in order to get a specific region from inputCells by ...
JimmyHu's user avatar
  • 7,393
2 votes
1 answer
812 views

My custom implementation of MATLAB's imdilate

I have been assigned to implement the morphological dilation operation without using MATLAB's imdilate, and I came up with the following solution: ...
saad.sawash's user avatar
4 votes
1 answer
2k views

Getting saddle points of a matrix

My homework assignment: Write a function called saddle that finds saddle points in the input matrix M. For the purposes of this problem, a saddle point is defined as an element whose value is ...
NAND's user avatar
  • 141
2 votes
1 answer
101 views

Applying a function to columns of two matrices producing their combinations

I made a short snippet for applying a function f that takes two arguments (vectors) to columns of two matrices producing all possible combinations of those columns. ...
Felix's user avatar
  • 293
4 votes
1 answer
493 views

Draw common tangents to two circles interactively in MATLAB

Requirement After a user draws two circles with their mouse successively, the program should draw all common tangents, if any, to them. Here is my implementation ...
nalzok's user avatar
  • 503
4 votes
1 answer
1k views

Exporting a table with header and subheader

I have an array matrix, for example A(3,3), I want to make a table with header names like, ['force','mass','acceleration'], the second row contains the units (subheader), ['N','Kg','m/s^2'], and the ...
Muhammad Abdulrasool's user avatar
1 vote
1 answer
161 views

Horizontally concatenating the entries of two matrices, and padding with NaNs

I have two matrices a and b that have, on each line, some values (null or not) and then a bunch of zeros at the end. I want to ...
shamalaia's user avatar
  • 316
5 votes
2 answers
118 views

Extract the largest value for each day from a matrix

I have a matrix in which the right-most elements are repeated YYYYMMDD dates in descending order, for example: ...
Stewie Griffin's user avatar
0 votes
1 answer
88 views

Assign values to a matrix based on the location of non-zero elements in another matrix

I have a matrix, A containing ones and zeros. I want to create a new matrix B where the non-zero elements are in the same ...
Stewie Griffin's user avatar
1 vote
1 answer
156 views

Merging two square matrices

I would like to optimize a snippet of code, which uses a multiple nested if statements. I am looking for a formula to make it as a combination of multiple arrays ...
user avatar

15 30 50 per page