Category "matlab"

Nested MATLAB struct is difficult to parse when fetched in DataJoint Python

From DataJoint Python and DataJoint MATLAB, I have inserted the same values into a longblob attribute. From DataJoint Python it was inserted as a dictionary an

How to decompose a 9x9 matrix to 3x3 matrices?

I'm trying to decompose a 9x9 matrix into 9 3x3 matrices. I've already used the command reshape, but the matrices it returns are the ones as transforming the co

I think I'm expressing this summation incorrectly in MATLAB?

I'm trying to code the following sum (which is the solution for a functional DE): This sum is valid for t in [nT, (n+1)T], where T is a constant number (found

Activation function on the hidden layers for Regression models in neural networks

I am trying to predict a single output value,y, using two input features. I read that regression models usually don't use any activation function, and even when

Excluding values from surf plot

Suppose we have a surf plot like this: A = round(peaks,0); surf(A) Is there any way to modify the colormap so that it excludes all values in A that are equal t

Use unit-testing framework in matlab to test data

I would like to test datasets with a variable number of values. Each value should be tested and I would like to have a standardized output that I can read in af

In Matlab, how to programmatically add datatip to trisurf objects with known vertices index?

Trisurf(f,x,y,z) function can draw a patch object. How can I add datatip to this object at the known vertices index with code? I tried to use the following code

Set xaxis of imagesc with scaled binned values

I have a matrix(20x400) and I am plotting it with imagesc in MATLAB where y axis having 20 values and xaxis having 400 values. However, I would like to know how

Set xaxis of imagesc with scaled binned values

I have a matrix(20x400) and I am plotting it with imagesc in MATLAB where y axis having 20 values and xaxis having 400 values. However, I would like to know how

Error while using mex file in Colab with Octave

I am trying to use MATLAB in Colab. MATLAB is run in Colab through Octave. I have to use the MR8fast() filter, which in turn uses anigauss.c. I could successful

how to write ant colony optimization code

i have a function function t=strength(x) t(1) = -0.804-0.001.*x(1)-0.001.*x(2)+0.0.*x(3)+0.0.*x(4)-0.031.*x(5)+0.005.*x(6)-0.002.*x(7)+0.001.*x(8)-0.735.

Output doesn't come. Plotting issue [Matlab to python conversion]

This is my Pyhton code. import numpy as np import matplotlib.pyplot as plt n = 3; #% No of image T = 100;

python equivalent code for matlab histogram

I am manually trying to convert a matlab code to Python for my application. The Matlab code is this: % BUILD HISTOGRAM % Specify bin centers of the histogram b

SSM model Standard errors Matlab covariance matrix

Does anybody know please how to obtain standard errors of estimates parameter in SSM model matlab? or how to get them from covariance matrix?

Equivalent functionality of Matlab unique() in MathNET.Numerics?

Is there a MathNET.Numerics equivalent of Matlab’s unique(A, 'rows') (or unique(A)), where A is a Matrix<double>? I have searched extensively throug

Filling in plot animation (polar function)

I have a set of videos shown in an assignment. How is this animation created? I am trying to create something similar. Below is my attempt; it is only drawing

How to test multiple different type return value in unit test?

My code and test code are as follows: return two value, one is vector, and is boolean. Using command to test is ok. But in unit test it is in error. command tes

Double lexicographic sorting of binary (0-1) matrices

I want to sort a binary matrix so that its columns and rows are both in lexicographical order by switching rows and columns. In other words, I need a double-lex

Switch between two map axes in Matlab

Is there a way to switch between two map axes in the mapping toolbox in Matlab? I created a basemap, then I created a small inset to show the map location in

Can I save a function's arguments in Matlab to reuse in another function?

I am using the topoplot function in Matlab as follows: topoplot(DATA, channels, ... 'maplimits', topoYlim, 'electrodes', 'on', 'emarker', {'.','k',[6],1},