Answered
How can I apply circular shift on bits in MATLAB?
hi, suppose you have a vector a=011000011, then shift circularly the vector : b=circshift(a,[1 1]), % if 1 is >0 then th...

13 years ago | 1

| accepted

Answered
Calculate the entropy of a special value in one column
hi, try : R=randn(100,2); % two columns e1=entropy(R(:,1)); % CICL e2=entropy(R(:,2)); % DICL

13 years ago | 0

Answered
Plotting functions in matlab
hi, try as example : % Constants K=2.33; A=1.45; t=0:0.1:10; a=0.45; % Anonymous function u=@(t) cos(t) ...

13 years ago | 0

| accepted

Answered
How to obtain the frequency of a signal as function of the time?
hi, This signal seems like a decreasing linear Chirp : 1) Frequency as function of time is called ' spectrogram') try : ...

13 years ago | 0

Answered
Not enough input arguments driving me crazy - help?
hi, i am not sure what are you trying to do, but try this partial code in the workspace : objfun=@(x) x(1)*x(2)*x(3) A ...

13 years ago | 0

| accepted

Answered
What is a function that takes the diagonal of a matrix (N) and converts the diagonal to all zeros.
try : function Y=diagzero(X) N=size(X); if N(1)~=N(2) error(' Matrix not square'); end Y=X; for x=1:N(1) Y...

13 years ago | 0

| accepted

Answered
how can i get the PSNR for an multibanded image?
hi, Take a look at my submission : <http://www.mathworks.com/matlabcentral/fileexchange/37691-psnr-for-rgb-images> In the...

13 years ago | 0

| accepted

Answered
Numerical integration using quad function
hi , try : >>F=@(x) sqrt(x); >>I=quad(F,0,10)

13 years ago | 0

| accepted

Answered
power of a signal
hi, 1)Go to Mathw(c) workspace and type : >>dpslib 2)then go and click on "Estimation" block , 3) click on "Power S...

13 years ago | 0

Answered
Multiplying each number in a matrix by a row
hi, you can try : % Your data A = [1 2 3 4 5; 6 7 8 9 10; 11 12 13 14 15]; B = [1; 2; 3; 4; 5; 6]; % Cell C=cell...

13 years ago | 0

Answered
Calculate vector norm in Simulink?
hi, if the first answer does not work, you can use other ways, like : 1) go to " User Defined Functions" in Simulink Block ...

13 years ago | 0

Answered
remove negative cells in a matrix by averaging
hi, you can try : % Given your matrix A : 1) A=randn(10); A(A<0)=A(A<0)*-1 2) Or use your idea : f...

13 years ago | 0

Answered
Calculate vector norm in Simulink?
hi, it does exist, its called "abs" , open Simulink library and go to :"Math operations" block , its the first on the list, w...

13 years ago | 0

Answered
i am adding two sound waves. i am receiving an error : ??? Error using ==> plus Matrix dimensions must agree. how i can add these two waves?
hi, The error occurs because y and z do not have the same length, try : [y,fs,nbits]=wavread('C:\Users\HP\Desktop\angel_4...

13 years ago | 1

| accepted

Answered
how to plot equation containing bessel functions
hi, change lx to : lx=0.7; fine?

13 years ago | 0

| accepted

Answered
define an array in equation
hi, try directly : Stx=(exp(1j*pi2*((fc*tau)+((k*(tau.^2))/2)))); plot(real(Stx))

13 years ago | 0

Answered
Why the function I wrote doesnt plot ?
hi, The function does not plot because the data contains NaN values in both Real and Imaginary parts , so try to change the cod...

13 years ago | 0

Answered
How can I calculate and plot rayleigh scattering equation?
hi, How is the graph you are expecting ? i altered the oscillating frequency to F=6Ghz . take a look at this code , and try al...

13 years ago | 3

| accepted

Answered
why filtering gives nan values.
hi, I think the input has a NaN, look at this example : r=rand(100,1); [b11,a11] = butter(5,4/24); MM1= filtfilt(b11,...

13 years ago | 0

| accepted

Answered
Hello, I am trying to plot radiation intensity of antenna using the following code but i am not getting polar plots with theta axis and polar, grids please help me. help me
hi, its working if you define PI and E : L=0.25; A=L*pi; lo=1;r=2; k=2*pi; E=1; THETA=0:0.01:2*pi; U =((cos(k/2...

13 years ago | 0

Answered
Question regarding fft output
hi, Your approach is correct but Your signal contains only one frequency f0, the graph shows the two sided spectrum , but you...

13 years ago | 0

Answered
finding the position of a number?
try this way a=[1 2 3;4 5 6]; b=2; [x,y]=find(a==b); A=[x,y];

13 years ago | 0

| accepted

Answered
saving captured images to a folder (error in imwrite function)
hi, The data you are trying to save are 4D , its a sequence of images as : Width x height x channels x Frames I sugges...

13 years ago | 0

Answered
Integral of a product between a function and a Cumulative Normal Distribution
hi, I am no sure about the error you get, but try this version : m=0; s=1; x=0:0.1:10; C=normcdf(x,m,s); PHI=2*e...

13 years ago | 0

Answered
adding noise to a wav file
hi, You have many ways : 1) method one : Mean=0.00; Var=0.005; z=imnoise(y,'Gaussian',Mean,Var); You can cont...

13 years ago | 3

Answered
I need help interpreting what this means. Could you give me detail to what this means. I need to be able to put it into words I am dealing with the dealing of tagging with animals
hold on, This commands holds the current graph to add new ones . plot ( time_r1 (idx_r1_A1), tag_num_r1 (idx_r1_A1), 'b+...

13 years ago | 1

Answered
Error fft for secuence FOR
hi , there is only one output argument Y, the syntax is : Y = fft(X) Y = fft(X,n) Y = fft(X,[],dim) Y= fft(X,n,...

13 years ago | 0

Answered
Finding Minimum value of radius
3)What is the minimum amount that r can vary from its optimal value before the area increases by 10% ( with fixed h ) : Give...

13 years ago | 0

Answered
Plot 3d, z = f(x,y)
hi, try : plot3(X,Y,Z) sqrt(120) X(end+1)=X(end); Y(end+1)=Y(end); Z(end+1)=Z(end); X=reshape(X,11,11); Y=reshape(Y,...

13 years ago | 0

Answered
How can I rebuilt a similar time series with less frequencies after performing an fft?
hi, try this modified version : % ORIGINAL SIGNAL fq = 100; %Hz (Sampling time 0.01) t = 0:1/fq:200; ...

13 years ago | 0

Load more