matlab questions

matlab questions

• All Sites

## 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 stackoverflow.com

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

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

## 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 stackoverflow.com

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

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

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

## 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') ; ...

## 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 stackoverflow.com

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

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

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

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

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

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

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

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

## 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 stackoverflow.com

## 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 stackoverflow.com

## && 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 stackoverflow.com

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

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

## 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 stackoverflow.com

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

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

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

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

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