Risposto
Is there any difference between rand(n,1) and unifrnd(0, 1, n, 1)?
They both generate sample from uniform distribution, *unifrnd* offers a possibility to enter the parameters while with *rand* yo...

oltre 11 anni fa | 1

| accettato

Risposto
how to plot a 10*10 grid map and how to number the grid cells? (sample pic is attached here)
I have a model that i wrote already, try to compare it with Joseph's method. [X,Y]=meshgrid(1:11); figure; hold on; plot...

oltre 11 anni fa | 1

| accettato

Risposto
Help with Fourier transform fft
Generally fft is two sided , you just need to truncate it : F=f(1:floor(end/2));

oltre 11 anni fa | 1

Risposto
Help with minimum of a matrix
As are you are concerned about the global mean, you truncate the Inf elements and compute the min: M(isinf(M))=[]; min...

oltre 11 anni fa | 0

Risposto
axis changing when plotting points
One method to fix the issue is to place the axis command inside the loop, suppose the limits are : L=[xmin xmax ymin ym...

oltre 11 anni fa | 0

Risposto
Random Variable with exponential distribution of Probablity Density Function
The beginning of the answer can be as the following : % first part alpha=2; % parameter N=400; % size...

oltre 11 anni fa | 1

Risposto
Simple matlab code issue
The quantity (C')*B*inv(A)*(C).^1 is scalar, and B+C.^2 is not correct : B+(C*C').^2; is correct

oltre 11 anni fa | 0

Risposto
How to plot trend lines of 2 FFT graphs which have very large data points?
One temporary solution is to downsample the two power spectra, this proposition is based on time-frequency uncertainty principle...

oltre 11 anni fa | 0

Risposto
How to represent the value of X and Y Pixels in array of Two Dimensions using Matlab
The provided answer is correct, you only need some processing steps, the image contains white borders , you need to crop it usin...

oltre 11 anni fa | 0

| accettato

Risposto
problem with for and function inside other function
From your description , the error occurs when you calculate the integral of pxcos1 from 1 to 1.4, that is the quad function, you...

oltre 11 anni fa | 0

Risposto
how to plot ellipsoid in 3d not in the center
For surface representation, you can use meshgrid to generate the ellipsoid with parameterization : a=5; b=3; c=1; [u,v]=...

oltre 11 anni fa | 1

Risposto
Finding Point of Increased Event Frequency
From the graph 3700 is approximately the point, from theoretical view point, you can search the inflection point using second d...

oltre 11 anni fa | 0

| accettato

Risposto
Quarter of an image.
Using vector function,the problem becomes simple, here is an example to select 1/4 of matrix : N=400; H=randn(N)...

oltre 11 anni fa | 1

Risposto
How to perform Monte Carlo simulation for Chromosome modelling?
You need to provide the variables needed for this description, is it simple Monte Carlo method or you need other criteria such a...

oltre 11 anni fa | 0

Risposto
Plotting the beamwidth from a matrix
Another way to compute the beamwidth is to plot the azimuth and Gain : Data=load('data_ABS_antenna_CASMA.mat'); X=Data...

oltre 11 anni fa | 0

| accettato

Risposto
Help with simple FFT problem
You have to change the sampling rate, try the following : fs=4000; t=0:1/fs:2-1/fs; VarName1=1.41.*sin(2.*pi.*1000.*...

oltre 11 anni fa | 0

Risposto
Plotting the beamwidth from a matrix
Here is the proposed solution, i suggest that you use the polar coordinates as the following : Data=load('data_ABS_antenna_...

oltre 11 anni fa | 1

Risposto
For standard eigenproblem EIG(A), A must be square
For a non square matrix, you need either to compute the covariance T*T' or you can adjust the dimensions , try the following pr...

oltre 11 anni fa | 1

Risposto
RGB TO GRAY ERROR
This is numeric problem, no need for images processing tools, in fact you are computing a type of two dimensional exponential fu...

oltre 11 anni fa | 0

| accettato

Risposto
What does the notation x[n|n+1] mean.
The notation X[n+1|n] means the equation that relates the state a discrete instants n+1 and n ( eventually X[n|n-1]), in probabi...

oltre 11 anni fa | 1

Risposto
how to generate an abitrary length colored noise when the PSD is know !
You proceed using Inverse Fourier transform , here is how you can start , let us consider zero mean random variable of length 20...

oltre 11 anni fa | 0

Risposto
Scatter3 and surf yields a bug?
To get uniform color, delete the light commands : colors = colormap('summer'); color = colors(end,:); surf([0 0; 1 1],[0...

oltre 11 anni fa | 0

Risposto
How to extract the value pixel values from an image or masked image?
Accessing a pixel is similar to retrieving element from matrix, here are two examples : for gray scale image : X=imread(...

oltre 11 anni fa | 0

Risposto
Probability Density Function using ksdensity is not normalized
The ksdensity produces a Probability density function, no need to divide by the length of the x vector : x=randn(200,1); ...

oltre 11 anni fa | 0

Risposto
how can i make a music using matlab??
There are many files that you can load and study using frequency analysis, here is simple example : data=load('gong.mat');...

oltre 11 anni fa | 0

Risposto
Interpolating a double array
There is an alternative to interpolation functions : % Given the vector r of 33x1 : r=randn(33,1); y=upsample(r,30); ...

oltre 11 anni fa | 0

| accettato

Risposto
How can i increase the number of circles in a polar grid?
In new version , there might be an option for increasing the number, however i made manual example here, in order to use it, tr...

oltre 11 anni fa | 0

Risposto
Conversion error while plotting
change the cell to vector : y=cell2mat(y);

oltre 11 anni fa | 0

| accettato

Risposto
Error using chol Matrix must be positive definite.
this an interesting problem, Generally, the matrix C must contain some negative and positive eigenvalues ( eig(C)) according ...

oltre 11 anni fa | 0

Risposto
convert binary image to RGB image
The technique you used failed because the function does not provide a visualization of three dimensional logical matrices, besid...

oltre 11 anni fa | 1

Carica altro