matlab questions

matlab questions

• All Sites

Forward and backward filtering

I have an input sequence x(n) and impulse sequence h(n)={ 0, when n= 0 .239052,when n=1 1.3357exp(-0.650286n) , when n > 1 I did a convolution and obtained y(n)=x(n)*h(n). I trimmed ...

Boosted decision trees using Matlab

I would like to experiment with classification problems using boosted decision trees using Matlab. In the paper An Empirical Comparison of Supervised Learning Algorithms this technique ranked #1 with ...

Matlab dll Error : -2147467259 for VBA in 64bit environment

I made dll in 64bit environment using deploytool of Matlab. The same functions and command works well in 32 bit environment. What I have miised? The vba code Dim MCLUtil As Object Dim ...

How to convert the length of the major axis property of the ellipse into cm?

I= imread('coins.png'); I = bwareaopen(bwmorph(im2bw(I), 'close'), 50); s = regionprops(I, 'Orientation', 'MajorAxisLength', ... 'MinorAxisLength', 'Eccentricity','Centroid'); imshow(I) ...

Output probabilities of binary support vector machine classifier in Matlab R2014a

I’m using SVM for classification of my binary output problem. I want probability of belonging to every class. How can I obtain it? For instance suppose this is our structure: X = [1 4 1 5 3 ; 4 5 4 3 ...

Soft Question: Where does Python fit into the picture?

So I've been debating whether or not I should bother learning Python. From speaking with my professors, Matlab seems to be the common language used in applied mathematics/computational science as far ...

6 answers | 1 hour ago by AlanH on scicomp.stackexchange.com

Quick and Efficient Method to Pass Variables from C++ to Matlab

I've developed a C++ program which calculates a set of coordinates (x, y) within a loop. Every iteration I want to send the coordinate to Matlab for further processing, at a speed of about 25 times ...

Matlab - Vectorizing some dimensions of array?

I try vectorizing a 'for loop' for array but it does not work to me. My 'for loop' is for k = 1:N R(n,n,k) = R(n,n,k) - SE3(k,k); end and vectorize it diagSE3 = diag(SE3); R(n,n,1:N) = R(n,n,1:N) ...

1 answers | 2 hours ago by Fastism on stackoverflow.com

good (free) software for producing publishable images?

I am producing 1d and 2d images using Matlab right now for comparison of accuracy against a given model. I need to compare my methods with the standard Gaussian .wfn model and I am going to do that by ...

Generalizing Matlab Hough Function

I am trying to modify the MATLAB hough() function so that it handles grayscale images. for that I started with openening the file hough.m, and I found that it makes a call to another function ...

Store and process big data in matlab

I want to do a Markov Chain Monte Carlo simulation. Therefore I need to store the generated states. The problem is that I want to run my program a while and generate a lot of states but MATLAB shows ...

I had csv files of size 6GB and I tried using the import function on Matlab to load them but it failed due to memory issue. Is there a way to reduce the size of the files? I think the no. of columns ...

1 answers | 2 hours ago by AKSG on stackoverflow.com

Min value in a 1 D array

I am trying to generate a 1D array in Matlab and calling another function to do it. However, I am getting an error when I try to find out the minimum element and its position within the array. I want ...

1 answers | 2 hours ago by Luia Moly on stackoverflow.com

Averaging subsets of certain dimensions in a 4D matrix in MATLAB

My problem stems from having difficulty conceptualizing 4D matrices (as opposed to 3D). In MATLAB, I have data stored in a 5x5x7x54 matrix. The 5x5 part is symmetric across the diagonal and represents ...

1 answers | 2 hours ago by chainhomelow33 on stackoverflow.com

Bandpass Filter for 4D image in Matlab

I have implemented in Matlab a bandpass filter for a 4D image (4D matrix). The first three dimensions are spatial dimensions, the last dimension is a temporal one. Here is the code: function ...

Plot given points\lines\arcs in 3D

I need to plot 6 points in 3D by using Matlab. I used the command 'plot3' but I couldn't draw it. The coordinates of points $A,A,B,B',C,C',D$ are given. $AD,BD,CD$ are straight line segments ...

Least Square Channel Estimation Technique

A communications channel is modeled by a finite-impulse-response (FIR) filter: $$y[n] = Hs[n] + w[n]$$ where $H$ is the channel coefficients, $s$ is the binary source and $w$ is AWGN A least Square ...

MATLAB 3D Simulation with SOLIDWORKS model

I'm learning to make a 3D simulation in MATLAB based on a model designed from SOLIDWORKS. There is an example: SIMULINK+SOLIDWORKS The way used here is: Create a 3D model in SOLIDWORKS Create a ...

1 answers | 5 hours ago by Phan on robotics.stackexchange.com

Matlab coder can't handle working C code

I am trying to learn how to use Matlab Coder. I can create a static library fine, but when I try to create a MEX file it blows up with errors during the conversion process. I have 2 C files that do ...

Unbalanced or unexpected parenthesis or bracket when transposing

I got this error when I use MATLAB R2014a. A = [1 2 3; 4 5 6]; A'(:) = [2 2 2 3 3 3]; But it works when I separate it into two steps: B = A'; B(:) = [2 2 2 3 3 3]; Does anyone know the reason? ...

Passing DurationTickFormat argument fails when done via a struct

In Matlab I wanted to pass arguments to the plot function by using a struct. This was going well until I wanted to include the DurationTickFormat argument. In the minimal example below, I get the ...

1 answers | 6 hours ago by ctp on stackoverflow.com

Interpolation of Data Value using Optimized Weighting of Its Features

Assume I have a data set ${ \left\{ {x}_{i} \right\} }_{i = 1}^{N}$ which represents the value of each data point. For each data we have its features ${f}_{i} \in {\mathbb{R}}^{d}$. The model I ...

MATLAB sort function yields tampered results

I have a vector of 126 elements which is usually correctly sorted; however, I always sort it to make sure everything is okay. The problem is that: when the array is already sorted, performing a sort ...

How to interpolate and plot a 4-Dimensional hamburger?

I have solved the heat equation in octave via finite difference and produced the following 3-D plot whose point colors correspond to the temperatures in each element of my three dimensional hamburger. ...

PCA output of Matlab's pca() function doesn't match manual calculation

I try to calculate the PCA in my matrix and I use two ways for this: PCA function [coeff, score, eigenvalues] = pca(M); And for compare and understand the PCA calculus, I try to calculate step by ...

1 answers | 8 hours ago by sushi on stats.stackexchange.com

Get Simulink to make lines between components the shortest distance/untangle Simulink mess

I am new to simulink. I made the mistake of "left aligning" about 15 components in Simulink. Now they're all siting on top of eachother and when I moved them apart, their wires look sooo tangled up. ...

Using interp2 in Matlab with NaN inputs

I have some observational data that is relatively complete, but contains some NaN values, in an matrix in matlab and I want to interpolate them to a more evenly spaced grid using interp2 So, to keep ...

Why inverse for loop in matlab is faster

I recently came across this for loop code in MATLAB that confused me because the inverse loop do the same thing faster. why this happens? clear all a = rand(1000,1000); b = rand(1000,1000); for ...

2 answers | 8 hours ago by Rohola Zandie on stackoverflow.com