matlab questions

matlab questions

  • All Sites

2 answers

changing the index value of vector in matlab

How do I change the index values of a vector/array in MATLAB? For example, A = [1 2 3 4 5]. Here A(1) = 1, A(2) = 2 and so on. I want to change the base value of the index to say 1001 or 2001 so that ...

2 answers | 2 mins ago by Vignesh R on Stack Overflow
0 answers

conditional entropy and mutual information

I have a problem. I implemented code for entropy calculation of any vector. I need to calculate the mutual information between two vectors. I can use this formula : H(x) + H(y) - H(x,y) or H(x) - ...

1 answer

What is the difference between imregionalmax() of matlab and scipy.ndimage.filters.maximum_filter

I need to find the regional maxima of an image to obtain foreground markers for watershed segmentation. I see in matlab use the function imregionalmax(). As I don't have the matlab software, I use the ...

2 answers

matlab remove for loop in matrix computation

I'm working on a problem on Matlab according to Matrix. I think my code could be improved by remove the for loop. But I really don't know how to fix this one. Can anyone help me, please? the code is: ...

2 answers

what is the use of S-function in simulink?

I have created a simulink model and I need to convert it to C/C++ code using S-function. Can anyone tell me how to create S-function and where and how to use this to generate code?

2 answers | 3 hours ago by Arutselvan on Stack Overflow
0 answers

Matlab: How to solve equations in matrix?

In matlab, we use mesgrid instead of double for loop to increase the speed especically when the number of looping is large. In my application, I am using mesgrid to find the critical point of a ...

3 answers

Normalized cuts with Matlab 2013a

I am using the normalized cuts package from (on Windows 7) This used to work fine with Matlab2010a. However I have upgraded to Matlab2013a (32 bit ...

0 answers

Customize polar plot in MATLAB?

I am trying to plot my high-dimensional data in the form of polar plot. Just as those video-game characters have polar plots showing their strengths and weakness. In case you still don't get me, I ...

2 answers

Matlab: Fast reading of file with many lines of (%d %d %ld)

I am kind of frustrated with fscanf and its time-performance in reading a file with structured data. I want to read a .txt file, which has three entries per line: DOUBLE DOUBLE LONG-DOUBLE, and I only ...

2 answers | 4 hours ago by NicoDean on Stack Overflow
3 answers

How to convert String of data to Int variable on Matlab?

I have a textdata {} Total number of rows 5.4 million with 3-4 digit integers. I wish to convert them to int on MATLAB. I tried using x = str2num(total_data(1:end,:)) but it didnt work.

3 answers | 5 hours ago by razshan on Stack Overflow
0 answers

detect outliers via chauvenet criterion and put zero or Nan in Matlab script

my task is to detect outliers in large dataset using chauvenet criterion.. Chauvenet-Test said: A reading may be rejected if the probability of obtaining the particular deviation is less than 1/2n. in ...

1 answer

Can I get Simulink blocks from commlib individualy

We were simulating communication with DPCM modulator in school. I saved the Simulink scheme and now I would like to simulate some more situations at home, but my commlib doesn't have the modulator we ...

2 answers

MATLAB MIRtoolbox - mirtempo function

I just want to know how functions like mirtempo(), which returns a mirscalar object to a direct format that MATLAB can understand. I have a script which contains tempo = mirtempo('file'); this ...

2 answers | 9 hours ago by Fredie Thomas on Stack Overflow
0 answers

fast way of importing multiple large files in matlab

I need to read about 4000 data files, each about 400 kB. The data will be analysed later so I wrote the files into a data structure. The importing operation takes about 4 mins and I have tried ...

1 answer

Parallelization of a Genetic Algorithm in Matlab

I'm writing a parallel Genetic Algorithm in Matlab, specifically a Dual Species Genetic Algorithm (DSGA) (more information can be found in this paper here), and I'm having some trouble parallelizing ...

1 answer

Find the corner pixel locations of a window open on desktop in MATLAB

I want to take a alt+screenshot of a window and input into MATLAB. Unfortunately, the screencapture code I found online only allows for you to take screencaptures of the desktop if you input the ...

1 answers | 11 hours ago by Loo Yung on Stack Overflow
0 answers

multiclass SVM classification accurancy

I'm facing a problem with classification using a multiclass SVM algorithm, in MATLAB, using 1vs1 approach followed by a majority voting technique to decide which label to assign to the sample ...

0 answers

Computationally Plotting an Implicit Equation

I have the following equation: $$F(x,y) = \sqrt{ (x^2 y)^{-0.2}}$$ and, $w/o$ a specific question, is there an advisable computational technique for plotting the above $(x,y>0)$? I am ...

1 answer

Calculate Euclidean distance between vectors in a large matrix. Matlab

Matlab question. I have this RGB matrix of a set of different pixels. (N pixels => n rows, RGB => 3 columns). I have to calculate the minimum RGB distance between any two pixels from this matrix. I ...

1 answer

MATLAB jsonLab to PARSE a JSON object

I have a json object and I am trying to parse to object in MATLAB to into a cell array however when I parse the filename it throughs this error... `Error using loadjson>error_pos (line 431) ...

1 answers | 13 hours ago by Adam on Stack Overflow
1 answer

MATLAB: How do I pass a parameter to a function?

I have the following function: function ypdiff = ypdiff(t,y) a = 0.01; b = 0.1; ypdiff(1) = -a*y(1)*y(2); ypdiff(2) = b*y(1)*y(2)-b*y(2); ypdiff(3) = b*y(2); ypdiff = ...

1 answer

How to proceed for BOW creation From sift features

I extracted sift feature to construct a bag-of-words model. I did the following to extract the feature vector: Extracted features from the key frames. After the feature extraction I tried using ...

1 answers | 14 hours ago by Video retrieval on Signal Processing
1 answer

An alternative algorithm for blob detection

Here's a sample image of my experiment which is to be processed for finding the information of all the blobs (centre, dimension etc.). Basically the image contains some noise, few bold lines, and of ...

1 answer

Suppressing eyediagram() function's figure

In MATLAB, calling the eyediagram() function causes a figure to be created. Is there a way to not show the figure? The arguments needed are internal to one of my functions. Which means, I have to ...

1 answers | 15 hours ago by user137017 on Stack Overflow
0 answers

Matlab Neural Network for Classes - Unseen Data

Say I create a neural network to separate classes: X1; %Some data in Class 1 100x2 X2; %Some data in Class 2 100x2 classInput = [X1;X2]; negative = zeros(N, 1); positive = ones(N,1); classTarget = ...

0 answers

LPC analysis sound fragment

I have a sound fragment on which I need to compare several LPC orders to see the effect of these orders. I thought I had the correct commands, but my figures seem to be a bit off. For example, here is ...

2 answers

Selecting rows of matrix by value of first column

Let's say I have a matrix A, whose first column are IDs, and a vector B, containing certain IDs in a random order (and some of them might be missing etc). How do I select the rows of A with matching ...

2 answers | 16 hours ago by Flos on Stack Overflow
0 answers

Hough Tranform Matlab

i Want to implement hough transform on image without using inbuilt function...some papers say that the image is first flipped before applying hough transform i am not understanding how matlab is doing ...

1 answer

Time changes in power spectrum on certain frequencies [MATLAB]

I would like to evaluate power spectrum (amplitude) changes in several tens of seconds length sound record, only on some chosen frequencies. The sound has spectrum like this (mobile phone app ...

1 answers | 17 hours ago by vicki on Stack Overflow
1 answer

bsxfun() Invalid output dimensions

I have a function that takes upto seven arguments and returns a row vector. The first three arguments are vectors (column, column, row) and the remaining four are optional scalars. I want to use ...

1 answers | 17 hours ago by user137017 on Stack Overflow
15 30 50 per page
1 2 3