0 answers

Matlab m-file compiled with mcc crashes with java error only if running from Visual Studio

I have a CFD Fortran code that calls a batch file this way: res = SYSTEM('start matlab.bat') The bat file then runs a deployable Matlab code, a little code to plot some data, with this command: ...

2 answers

How to apply corr2 functions in Multidimentional arrays in Matlab?

Let's say I have two matrices A and B A = rand(4,5,3); B = rand(4,5,6) I want to apply the function 'corr2' to calculate the correlation coefficients. corr2(A(:,:,1),B(:,:,1)) ...

0 answers

Overloading symbolic toolbox functions

In Matlab we can overload any function. The convention is to place the new/overloaded function file inside a folder which addresses the data type prepended by an '@'-sign. A famous example can be ...

1 answer

Matlab optimisation query, avoiding that repmat

This is a simple question, I can't see a better answer and maybe someone else can! Here is the code: Example variables nSim = 3000; nRow = 10000; data = zeros(1, 5, nRow); data (:, 1:4, :) = ...

1 answers | 1 hour ago by N t on Stack Overflow stackoverflow.com
0 answers

Decompose an image into Sinusoidal Gratings using MATLAB

"Any 2D image can be decomposed into a unique set of sine gratings". How can I decompose my image into sine gratings? And how can I plot some of these gratings on screen?

2 answers

Using ARPACK solving eigenvalueproblem, but getting inconsistent results with Matlab

I'm new to ARPACK, I downloaded a script like the following import time import numpy as np from scipy.linalg import eigh from scipy.sparse.linalg import eigs np.set_printoptions(suppress=True) n=30 ...

0 answers

Matlab GUI: override behaviour of the spacebar key

I have built a GUI in matlab using GUIDE, and added keyboard shortcuts to some actions using the WindowKeyPressFcn callback function of my figure. my problem is that I want to use the spacebar as one ...

0 answers

The fsolve matlab function not converging

I have a system of 6 equations in 6 unknowns and I am trying to solve it using fsolve. A strange thing arises though. When I keep 6 in eq's in 6 un's as they are and call fsolve they solver does not ...

0 answers

Mixture of Student t-distribution Model using Matlab

I am wondering if anyone got a reliable Matlab implementation for Mixture of Student t-distribution Model (MoT) for multi-variant clustering? I can find some publications that claimed MoT is a better ...

2 answers

Train Neural Networks on a Data of type Table

I loaded a huge CSV file of 2000 instances with numeric values and limited text values(some attributes have values like 'Yes' 'No' 'Maybe'. The above data was imported using readtable in Matlab. I ...

5 answers

MATLAB: How To Efficiently Remove NaN Elements from Matrix

I am looking for a way to remove the NaN numbers from a matrix in MATLAB efficiently (i.e. without using a for loop) I will provide a quick example to illustrate what I am trying to achieve: Say I ...

5 answers | 3 hours ago by Berk U. on Stack Overflow stackoverflow.com
1 answer

Find points forming lines using Hough transfrom

I have a dataset and I would like to group the points forming lines parallel to the Y axis (see image). I guess the way to do it is by using the Hough transform; do you have any suggestion of how to ...

1 answers | 4 hours ago by albus_c on Stack Overflow stackoverflow.com
0 answers

Simple Object detection using Matlab

I have a very simple problem I need to solve: my input will be a picture of an object, with a white background (keep in mind that the object may be of any color, including white). The only thing I ...

0 answers

fails to import module when using matlabdomain

While trying to use the sphinx matlab domain I can't get the MWE to work, provided on the extensions pypi site There is always this Can't import module error. I'd guess, that the extension kind of ...

0 answers

clustering tags in large scale user-tag matrix in matlab

I am trying to cluster a set of tags in huge sparse matrix of user-tag in matlab, say: 35000*74000 with 99% sparsity. I probably have two choices: 1: Making Co-occurrence matrix of tags and apply ...

2 answers

MATLAB out of memory error by a matrix transpose

I have a cell, Data, it contains three double arrays, Data = [74003x253 double] [8061x253 double] [7241x253 double] I'm using a loop to read these arrays and perform some functions, for ...

2 answers | 4 hours ago by Kamtal on Stack Overflow stackoverflow.com
1 answer

Issue with imdistline() function in MATLAB?

I am trying to measure the distance two points on an image and then use that distance as an input for some other function. Here is my code: figure, imshow(I); h = imdistline(gca); api = ...

1 answer

Using different intensities of a specific color for contour plots

This question is in reference to visualization of EM clustering(or K-means) of 2D gaussian data. Say, I have displayed 3 clusters obtained from EM in a scatter plot with 3 different colors(say r,g,b) ...

1 answer

connect to IB TWS through matlab

I have been trying to connect to interactive broker TWS through Matlab. I have Matlab version R2013b installed. I have installed IB TWS and its API on my computer. but when I try to connect to TWS ...

1 answers | 5 hours ago by user3289084 on Stack Overflow stackoverflow.com
1 answer

How to transform csv data into a 3D matrix in Matlab?

The csv file contains 4 columns. First three columns describe X, Y, Z, coordinates and the forth one Q describes a quantitative property in such 3D space. This array illustrates an example of the ...

1 answers | 5 hours ago by Boris L. on Stack Overflow stackoverflow.com
1 answer

reading remote images in ssh server with matlab

Is it possible to read an image in a remote server with ssh in a matlab code? I mean, I want to do this, but Matlab is not allowing: ...

1 answers | 6 hours ago by mad on Stack Overflow stackoverflow.com
0 answers

Detecting shape in matlab using corr()

I am trying to write a function where I have two images, and I have to detect one image in another image. But I want to do it without using normxcorr(). Instead, I was thinking about implementing ...

1 answer

Place MATLAB contour plot on any plane

I have a 3d plot and I'd like to put a 2d contour plot in a vertical (XZ) plane. When I place a contour plot, it always places it on a XY plane. If it were a pcolor, I could swap the YData and ZData ...

1 answers | 7 hours ago by James on Stack Overflow stackoverflow.com
0 answers

function using syms variable is not prining values

I tried this small code in matlab , found it in syms documentaion. But its not working. syms x y f(x, y) = x + 2*y f(1, 2) I am getting the following error ??? Error using ...

2 answers

Get absolute peak location in a vector in MATLAB

Suppose I have the A matrix like this: A = [0,0,0,0,0,0,106,10,14,20,20,23,27,26,28,28,28,23,28,28,21,18,106,14,12, 17,16,15,22,19,20,18,21,23,23,18,17,15,106,28]; >> plot(A) I want the ...

2 answers | 8 hours ago by user2201486 on Stack Overflow stackoverflow.com
1 answer

Why can't I get convolution to work properly in MATLAB?

Convolving signals in MATLAB produces unexpected results every time. Take the following code for example, in which I attempt to convolve a rect function with itself: clc clear all x=-5:.01:5; ...

1 answers | 8 hours ago by David Webb on Stack Overflow stackoverflow.com
0 answers

Achieve filter response similar to Matlab filtfilt in realtime?

I have face a problem for last few months where solution to it seems like a dream to me! :D Work i followed... Initially i high pass a certain signal to remove dc shift of it using filtfilt function ...

1 answer

plot a decision curve for logistic regression with gaussian Kernel

I have tried using logistic regression with polynomial feature, and fortunately its working fine for me and also I am able to plot the decision curve. I have used map_feature function for polynomial ...

2 answers

Creating a basic feed forward perceptron neural network for multi-class classification

I am new to neural networks and I want to create a feed forward neural network for mutli-class classification. I am allowed to use any code that is publicly available but not any MATLAB ToolBox as i ...

1 answer

Calling an .m file through another function file in matlab

My professor is having me write a program to perform the bisection routine to find the root of an equation. Before I go on, here are the program files so far: function [l,r,nf] = ...

1 answers | 10 hours ago by Brandon1234 on Stack Overflow stackoverflow.com
15 30 50 per page
1 2 3