matlab questions

matlab questions

  • All Sites

1 answer

Count the percentage number of colours in an image

I have completed a programming that can count up to 8 colors in images by using the RGB method from 000 up to 111. I need to do some modification to it. So far I declare the number if above 128 will ...

1 answers | 3 mins ago by Rabani Ahmad Tasman on Stack Overflow stackoverflow.com
1 answer

Precision of calculations

I am doing a calculation in Fortran on a double-precision variable, and after the calculation the variable gets the value -7.217301636365630e-24. However, when I do the same computation in Matlab, ...

1 answer

Fourier Decomposition

Hello everyone have a look at this video of Fourier Decomposition of an image(otherwise you can also refer the image which shows few plots of different extracted waves from an image) . We also know ...

1 answer

MATLAB xlswrite name data

How can I assign a name to a matrix being written from MATLAB to Excel using xlswrite? This is equivalent to opening the xls sheet, selecting the data and right-click->define name. Here I can assign ...

1 answers | 16 mins ago by Sumit on Stack Overflow stackoverflow.com
0 answers

Generating volume constrained splines in Matlab

Suppose I have a set of 3 dimensional points, r_1,r_2, ...,r_n suppose between points r_i and r_i+1 there is an associated volume V_i I want to construct splines (i'm not fussy on what interpolation ...

1 answer

Matlab : Object array indexing by property

In Matlab, I would like to create an array of objects from where I can pick up an element by one of its unique property while keeping the same behavior as normal indexing. Here is the class: ...

0 answers

Puzzle to puzzle you:image

I am beginer in signal processing. Suppose 3 1D Signals x(t), y1(t) and y2(t) are given as x(t)=sin(40*pi*t); y1(t)=.5*sin(40*pi*t) and y2(t)=x(t)+y1(t). Left side =Right side Here,values of ...

1 answer

Matlab: How to avoid artefacts in filled contour plots

I am trying to export filled contour plots from Matlab as vector graphics to include in a Latex file. My current methodology is: contourf(x,y,v_mag,20), axis([0,width,0,height]),daspect('manual') ; ...

2 answers

Incremental matrix without loop

(Just approaching Matlab for personal understanding), suppose I have a Z,Y matrix in this case Z=1 Y=3 A=1:3 output: 1 2 3 Now I need to increase the matrix vertically to obtain: 1 2 3 2 4 6 3 6 ...

2 answers | 54 mins ago by FeliceM on Stack Overflow stackoverflow.com
0 answers

Generating volume constrained splines

Suppose I have a set of points in $\mathbb{R}^3$, $\{\vec{r}_1,\vec{r}_2, ...,\vec{r}_n\}$, suppose between points $\vec{r}_i$ and $\vec{r}_{i+1}$ there is an associated volume $V_i$. I want to ...

0 answers

Count Color objects in images

I'm working in image segmentation, testing a lot of different segmentation algorithms, in order to do a comparitive study. At the moment i've implemented the mean shift algorithm. I would like to ...

0 answers

Import M-File variables into other script - MATLAB

I'm writing a very long GUI and wanted to export some parts to single m-files for better readability. The first thing I want to export is the declaration of variables. I know that it would work ...

0 answers

Matlab: Image segmentation using first order moments

I'm writing a code that allows the user to choose some regions in an image and then I shall show the image with the regions in gray (different gray level for each different region). The user doesn't ...

2 answers

Grayscale segmentation/feature extraction/blob detection?

I'm trying to find a starting point, but I can't seem to find the right answer. I'd be very grateful for some guidance. I also don't know the proper terminology, hence the title. I took an image of ...

1 answer

How can i remove overlaping circles after Hough Transform segmentation

I'm working in image segmentation, testing a lot of different segmentation algorithms, in order to do a comparitive study. At the moment i'm using Hough transform to find circles in the image. The ...

1 answer

Reshape column vector

Hello I'm working with MATLAB and I have a "z" column vector that has dimension of (9680 x 1). I want to reshape it in order to have an array "z" of dimension (44 x 220). I'm doing the following: ...

1 answer

Matlab equivalent of Python's 'reduce' function

I have a bunch of matrices of the same size m*n: a, b, c, d, and I'd like to find the maximum of them elementwise, like: mx = max(a, max(b, max(c, d))); apparently the code above is not concise ...

0 answers

Basic file I/O in Matlab

I am trying to read a particular textfile into Matlab, and store only float values into a Matlab matrix. I have found a few different ways to do it, but none work quite the way I want. I think the ...

2 hours ago by AJA on Stack Overflow stackoverflow.com
2 answers

permutations of vectors in matrix in matlab

I have a static matrix from a file: size(data)=[80 5] What I want is to change position of each vector randomly when I use perms like: N = size(data, 1); X = perms(1:N); ...

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

&& operators issue in MATLAB

Here is my code: friendly_output = num2str(std(counts_channel),'%.4f'); if friendly_output > 0 && friendly_output <= 1000 variable = 100 elseif friendly_output > 1000 && ...

1 answers | 2 hours ago by Yang Xia on Stack Overflow stackoverflow.com
0 answers

Matlab P file opening in Octave

I use Octave and have a Matlab made P file (protected function file). How can I open it, use it with Octave? Are there any method to convert it maybe or get content from it?

0 answers

How to suggest only one coefficient while fitting with gauss2 function

I am trying to fit a set of data with the function gauss2 and I would like to suggest the initial value of one coefficient(b1) before doing the fitting, while let the programme decide fo the other. ...

1 answer

how to graph error in parameters from polynomial fit - MATLAB

I have a list of data that I am trying to fit to a polynomial and I am trying to plot the 95% confidence bands for the parameters as well (in Matlab). If my data are x and y f=fit(x,y,'poly2') ...

1 answers | 3 hours ago by user2769660 on Stack Overflow stackoverflow.com
1 answer

Getting the array sorted in relation to a value Matlab

Let's say I have an array arr of doubles: arr = 120,121,118,119,117,123,120 And a value x x = 120 I want to get this value newarr = 120,120,119,121,118,117,123 Which is a new array, the ...

2 answers

Combine 2D matrices to form 3D one in Matlab

I have 3 20x2 double arrays A, B and C. I want to combine them in one 3d array D so that D(:,:,1) will return A, D(:,:,2) will return B and D(:,:,3) will return C.

1 answer

Speed up convolution computation code

I have the following code in MATLAB [Mx,Nx] = size(x); [My,Ny] = size(y); padded_x = zeros(Mx+2*(My-1),Nx+2*(Ny-1)); padded_x(My:Mx+My-1,Ny:Ny+Nx-1) = x; y = rot90(y,2); z = ...

3 answers

Speed-efficient classification for complex vectors in MATLAB

I am trying to optimize this piece of code and get rid of the nested loop implemented. I am finding difficulties in applying a matrix to pdist function For example, 1+j // -1+j // -1+j // -1-j are ...

1 answer

how to select rows of a matrix on the basis of occurrence of elements in matlab?

i have a [sentence cross words] matrix as follows. x = [ 0 1 1 0 1 1 1 1 0 0 0 0 1 1 0 1 1 0 1 1 0 0 0 0 0 ]; 0 shows a word is present in respective sentence and 1 shows a ...

3 answers

How can I fill a matrix with all the N-Ary numbers fast?

It is really stupid all I am trying to do is having a 7 column matrix consisiting all mod 7 numbers and it takes a huge time to generate such a matrix utilizing the following code to = 7^k; msgValue ...

3 answers | 4 hours ago by shampoo on Stack Overflow stackoverflow.com
0 answers

How to get more accurate decimal points in ksdensity function in matlab?

I am dealing with a very small p value due to the multiple comparison issue in a neuroimaging data (less than 1e-8). In a below matlab code, the null distribution is composed of from 50,000 to ...

15 30 50 per page
1 2 3