Answered
Trying to write a series: 2n+1
hi, try this : % Sol1 : vectorized serie1=2*[2:30]+1; figure, plot(serie1); % Sol2 : loop for x=2:30 serie2(...

13 years ago | 0

| accepted

Answered
make log spacing, specifying the length of the first interval
hi, specify the first length : % Logspace s=logspace(0,1,10)/10; s(1)=0.008; % 8 ms % Or linear Space s2=linspace(...

13 years ago | 0

Answered
using fprintf within a function
hi Caleb, You can define your function without output like this : function []= num2let(n) if n > 89.49 fprintf('>...

13 years ago | 1

| accepted

Answered
how to split signal in dtmf program
hi MU, in DTMF ( Dual Tone Multi Freqency) the phone number is composed of 11 digits, so you need to divide the length of y o...

13 years ago | 0

Answered
please correct the code..
The code is correct, but i made a small change : a0 = 0.05; a1 = 0.1; b1 = 0.85; nu = randn(2300,1); epsi = zeros(2300,...

13 years ago | 0

Answered
why fft spectrum for f1=sin(2*pi*10*t) is so much different from f2=sin(2*pi*9*t)?
hi, Nothing wrong with the code, it is true, the two spectra have an amplitude of 1. Perhaps you have drawn the two graphs in...

13 years ago | 0

Answered
Autocorrelation of data in a matrix
Hi Nida, 1) If you are talking about 2D Autocorrelation :You can use the function "xcorr2". example : A=1.33*randn(40...

13 years ago | 0

Answered
How do I save captured video to an avi like imaqtool does?
Hi 1)you have an error in your code : you wrote "FramesAvaialble", it is "FramesAvailable" . correct that and try again . ...

13 years ago | 0

| accepted

Answered
KALMAN FILTER noise data
hi Mojtaba you can take a look at my submission : <http://www.mathworks.com/matlabcentral/fileexchange/38353-1d-standard-...

13 years ago | 0

Answered
how to convert matlab code to .exe file?
hi, did you try mcc doc mcc

13 years ago | 0

Answered
Evaluate f(x) for multiple evenly spaced values
hi, You can set the values using 'linspace' : x=linspace(5,20,10); f=@(x) sin(x) y=feval(f,x);

13 years ago | 0

Problem


Max index of 3D array
Given a three dimensional array M(m,n,p) write a code that finds the three coordinates x,y,z of the Maximum value. Example ...

13 years ago | 9 | 434 solvers

Answered
Is double precision standard in matlab? How do I calculate in that precision.
Hi, yes double precision is standard in Matlab that represents floating-points numbers in either double-precision or single-...

13 years ago | 1

| accepted

Answered
discrete second order derivative operator for unequally spaced data
Discrete Laplacian : del2(matrix) Example : [x,y]=meshgrid(-4:.1:4); z=exp(-x.^2-y.^2); dz2=del2(z);

13 years ago | 0

Answered
Is there a command to do the opposite to "load"?
i think you can : 1) Name differently the variables , like the first load data(m1,v1...) the second load data2(m2,v2,...) or...

13 years ago | 0

Answered
Fliping a value between zero and one
your_vector=mod(0:1000,2); % single line code for i=1:length(your_vector) % YOUR CODE fprintf('%d\n'...

13 years ago | 1

Answered
Fliping a value between zero and one
for i=1:N if mod(i,2)==0 R(i)=1; end end

13 years ago | 0

Answered
Can you please tell me how to filter this image of noise without suppressing the border information?
hi, Richa, I think Image Analyst can give the solution , anyway i tried to filter your image with Wiener filter, i can not d...

13 years ago | 0

Answered
I'm am having trouble writing a derivative function.
Hi, Becca The first answer has prob, here is a fast way : function [ der ] = derivative(f,x,dx) %derivative This fun...

13 years ago | 0

Answered
I'm am having trouble writing a derivative function.
Hi, try this : function [ der ] = derivative(f,nsamp,dx) %derivative This function solves problem 5.19 in Chapman (2008)...

13 years ago | 0

Answered
Integrating a multivariate function w.r.t. a single variable
Hi, try this : syms x y h=exp(-x^2-y^2) F1=int(h,x) F2=int(h,y) Based on F1 and F2 you make function handle : ...

13 years ago | 0

Answered
Continuous video acquisition until some other flag ends?
Hi Diego, The only thing i can tell is that, as you got only 3 seconds so maybe i propose to modify the property "FramesPerTr...

13 years ago | 0

Answered
how to solve non-linear transcendental equation with many roots
2nd answer : You can use " solve" with symbolic variable : syms x y=x-(2*(sinh(x)*((cos(x))^2+cos(x)-1)+sin(x)*(cosh(x)...

13 years ago | 0

Answered
how to solve non-linear transcendental equation with many roots
Hi, there many ways to get solution, You use a function Handle : >>f=@(x) x-(2*(sinh(x)*((cos(x))^2+cos(x)-1)+sin(x)*(cos...

13 years ago | 0

Answered
why is this "if" statement is never true?
Hi, i saw that the answer is not satisfactory, because we evaluate for 20000 points in Time and get only 20 values in Mass, Velo...

13 years ago | 0

Answered
How to create a function in the editor, then evaluate the function and plot the function.
Hi, Truxton, In your code : you did two different things, making a function in M-file but inside that function , you used als...

13 years ago | 0

| accepted

Answered
Get max value and index of multidimensional array
Hi, try this function function [Max,index] =Max3d(x) N=size(x); if length(N)<3 error(' Input 3D array')...

13 years ago | 0

Answered
How do I do this assignment?
Hi Jack, As this is an assignment, you have to post what you have achieved so far so as to see and try to orient /discuss yo...

13 years ago | 0

Answered
plot a graph using For statement
Hi,you have to define all your variables , the code now is technically correct but you have to initialize your variables : f...

13 years ago | 1

| accepted

Load more