matlab questions

matlab questions

  • All Sites

0 answers

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 ...

1 answer

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 ...

0 answers

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 ...

0 answers

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) ...

1 answer

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 ...

6 answers

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 Computational Science
1 answer

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 ...

1 answer

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 Stack Overflow
4 answers

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 ...

0 answers

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 ...

1 answer

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 ...

1 answer

loading large csv files in Matlab

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 Stack Overflow
1 answer

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 Stack Overflow
1 answer

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 Stack Overflow
1 answer

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 ...

0 answers

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 ...

0 answers

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 ...

1 answer

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
0 answers

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 ...

1 answer

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? ...

1 answer

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 Stack Overflow
1 answer

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 ...

1 answer

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 ...

1 answer

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. ...

1 answers | 7 hours ago by FaceInvader on Stack Overflow
1 answer

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 Cross Validated
0 answers

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. ...

0 answers

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 ...

2 answers

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 Stack Overflow
0 answers

How to get the intersection volume of two meshes (faces & vertices)?

Do you know how to get the intersection (corresponding) volume/meshes of two polygon meshes consisting of the set of faces and vertices in Matlab?

0 answers

how to call matlab function in python script?

All my previous work (some big functions) are programmed by Matlab (some .m files). Now I get some robots of which the embedded functions are programmed by python. I want to apply my Matlab functions ...

15 30 50 per page
1 2 3