Answered
How to create overlapping blocks using a matrix rows ?
Try this: A=[0 1 0 0 1 1 0 1 0 1 0 1 0]; S = hankel(A, [0 1 1 1]); S = S(1:10,:); B = mat2cell(S, ones(1,size(S,1)), size(S...

8 years ago | 1

| accepted

Answered
How can I draw a line from center of multiple circles that will intersect all the circles?
Try this: t = linspace(0, 2*pi); r = [1, 2, 3]; xc = 0.5; yc = 0.1; xcir = (r(:)*cos(t))' + xc; ycir = (r(:)*sin(t))' + y...

8 years ago | 1

| accepted

Answered
how to calculate the norm of each elements of a matrix?
I am not certain what you intend with the term ‘norm’. See if the abs (link) function will do what you want.

8 years ago | 0

| accepted

Answered
Differential System Of Equations
No mystery at all. Add these three assignments after your dsolve call: xSolvpa = vpa(xSol) ySolvpa = vpa(ySol) zSolvpa = ...

8 years ago | 0

| accepted

Answered
Optimizing zero-crossing indices
I wrote ‘zci’ so I will do my best to help you with it. It contains no error checking, so there can be a ‘wrap-around’ effect...

8 years ago | 0

| accepted

Answered
matlab on my desktop does not find a function in the path?
My first suggestion for such problems is to run these from a script or from the Command Window: restoredefaultpath rehash to...

8 years ago | 0

| accepted

Answered
How to unclip acoustic data
Probably not, as discussed in how to remove sound clipping in existing record. The only approach that comes to mind might be ...

8 years ago | 0

Answered
I want to plot my results individually under each other like a row and not a continues impulse response . Something isn't correct when i try it, Can someone help please?
I am not certain what you want. Try this: x = linspace(0, 20000, 20000)'; % Create Column Vecto...

8 years ago | 0

| accepted

Answered
Undefined variable "comm" or class "comm.FMBroadcastModulator". Why is this happening on my MATLAB Workspace window?
Those are Communications Toolbox functions. You should be able to use them if you have the Communications Toolbox installed.

8 years ago | 0

| accepted

Answered
text editing commands error
In your fprintf call, the escape characters require a ‘backslash’ or ‘backslant’, not a ‘forward slash’ or ‘forward slant’. T...

8 years ago | 0

| accepted

Answered
How to fill space between two lines?
Try this: H_up = [0,cosd(80)*7.387/10,cosd(70)*7.985/10,cosd(60)*8.906/10,cosd(50)*1.025,cosd(40)*1.238,cosd(30)*1.155,cosd(20...

8 years ago | 2

| accepted

Answered
Digital Signal Filtered: How should I interpret my results?
We do not know what your filter is doing. Is it a highpass, lowpass, or something else? It appears that the squarewave input...

8 years ago | 0

| accepted

Answered
Problem regarding using fminunc
One obvious approach is to use an options structure: opts = optimoptions('fminunc', 'MaxFunctionEvaluations',1E+6); x0 = ...;...

8 years ago | 0

| accepted

Answered
intersection between two arrays of objects
See if the intersect (link) funciton will do what you want.

8 years ago | 0

Answered
How can i count the number of points within a region of a circle?
With respect to counting them in each segment (once you have defined the segments as polygons) is to use the inpolygon (link) fu...

8 years ago | 0

Answered
Code for shannon energy envelope?
Shannon energy is defined as , so use an anonymous function such as: ShannonEnergy = @(x) x.^2 .* log(x.^2); and then take th...

8 years ago | 1

| accepted

Answered
Matlab stuck at Warning about Integers
Without knowing more about ‘cutData’, it’s difficult to provide a specific solution. Subscripts must be integers greater than 0...

8 years ago | 0

Answered
How to use equation solver with conditions
Theoretically, yes: syms x a r assume(a > 0) x = isolate(-((2*(90 - x)^r - (2*x + 90)^r)*(a + 4)*(r - 1))==0,a) However,...

8 years ago | 0

| accepted

Answered
Vpasolve and indeterminate system
The vpasolve function may not be your best option. See if the lsqr (link) function will do what you want. It’s intended for ...

8 years ago | 0

Answered
Can someone help me?Find the minimun of the Function under these condition?
You have 3 values for the initial parameter estimates and only 2 parameters. Also, using 0 as an initial parameter is never a g...

8 years ago | 0

Answered
Pdist2 inside for
No loop needed, since pdist2 does it all for you: A = [0.2 0.4 0.5 1.4 0.6 4.5 0.3 0.5 3.1]; B = [0.8 0...

8 years ago | 0

Answered
How do i represent graphically e-r?
Try this: syms r(n) n r(n)=(1+1/n)^n; lim_r = limit(r, n, Inf) fplot(r, [0 500], '-b') hold on fplot(lim_r, [0 500], '...

8 years ago | 1

| accepted

Answered
How to get frequency spectrum in milisecond in matlab?
The term ‘frequency spectrum’ implies frequency, not time. Perhaps you want the spectrogram (link) function that will give you ...

8 years ago | 0

Answered
How to translate figure so that point1 [0 -1]' is located at the origin?
I am not certain what result you want. One option is to add this line after the plot call: axis(reshape([point1, point3]', ...

8 years ago | 1

| accepted

Answered
Extracting text files to Matlab
There are several ways to read your file. One option, using the textscan (link) function: fidi = fopen('filename.txt','rt')...

8 years ago | 0

Answered
chebwin error at end?
‘Is that a bug?’ It doesn’t seem to be, at least if I understand what you’re referring to. From the documentation for the ...

8 years ago | 0

| accepted

Answered
i am trying to record a sound(audio signal) and it keeps giving me error's on get audiodata, can you help me identify the problem?
If you want to specify that ‘a’ is an int8 data type, try this: b = getaudiodata(a, 'int8')

8 years ago | 0

| accepted

Answered
Edit data labels without regenerating plot
See if setting the 'VerticalAlignment' and 'HorizontalAlignment' paramters helps. Example — x = 0:pi/36:2*pi; y = sin(x); ...

8 years ago | 0

Answered
How do I calculate the error of a fitted curve?
See if the Statistics and Machine Learning Toolbox nlpredci (link) function will do what you want.

8 years ago | 0

| accepted

Answered
num2str errors
The ‘filename’ assignment in your code is not the correct syntax. It should be: filename = ['A',num2str(kk),'.dat']; Note ...

8 years ago | 1

| accepted

Load more