Réponse apportée
choose elements from array randomly
One thing you can do is: % create vector a = randn(100,1); % determine how many elements is ten percent nume...

plus de 13 ans il y a | 0

Réponse apportée
How to plot two independent curves as symbols in one graph?
I don't have any problem with your code, what version of MATLAB are you using? Do these work for you? X1 = [1:99,1]'; X2 =...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
divide matlab line plot in two lines of the same colour
You can easily break up the data where there is clear jump in the azimuth: 68.7000 to 287.0000 To do this you sort the azim...

plus de 13 ans il y a | 0

Réponse apportée
extraction of video frames in simulink
You should not start a new thread for the identical topic: <http://www.mathworks.com/matlabcentral/answers/48850-how-to-read-...

plus de 13 ans il y a | 0

Réponse apportée
How can i use L'hospital rule i.e sin(x)/x for x tends to zero?
You can do this: x = -5:0.001:5; y = sin(x)./x; plot(x,y) Since the increment in the x-variable is 0.001 and...

plus de 13 ans il y a | 0

Réponse apportée
divide matlab line plot in two lines of the same colour
Do you need to plot these with a line? Typically when you plot data like this you would just use a scatter plot plot(azimu...

plus de 13 ans il y a | 0

Réponse apportée
Cant get plotyy to work with string x tick labels
This has to do with how plotyy() creates two overlappying x-axes. You can work around this with the following: [AX,H1,H2] ...

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
Superimposing Normal Distribution on Histogram
Why do you say that you must have a number of bins that is not an integer? How can you have anything but a positive integer for ...

plus de 13 ans il y a | 0

Réponse apportée
how can i identify the damaged portion in the matrix?
What do you mean by "damaged portion" imcrop() optionally returns additional outputs like the cropping rectangle as well as the ...

plus de 13 ans il y a | 0

Réponse apportée
Questian about optmization errror.
First clear c if it's in your workspace and try this. c = [atan(deg2rad((x(9)-x(10))/(x(11)-x(12))))-... atan(d...

plus de 13 ans il y a | 0

Réponse apportée
How to get the fitted data by using Matlab's "Fit" Function?
It gives you a 1-D vector, but that 1-D vector is a polynomial in two variables, hence it is a function of the form f(x,y)=z ...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
Question about infinite looping
Yes, you can program that in. For example, you can program in that if a solution is not found after so many iterations that you ...

plus de 13 ans il y a | 0

Réponse apportée
How to get the fitted data by using Matlab's "Fit" Function?
Hi, you can use the coeffvalues() method on the fitresult object. coeffs = coeffvalues(fitresult); That will give you ...

plus de 13 ans il y a | 1

Réponse apportée
same values using randi setting seed as default
I'm not sure exactly what you're asking here. If you are calling randi(10) even a small number of times (here 4 times), ...

plus de 13 ans il y a | 2

Réponse apportée
applying log to matrix converts from real to complex: why?
It makes perfect sense to me that log() can produce complex numbers, but I'm confused by the NaNs. Can you give an example of an...

plus de 13 ans il y a | 0

Réponse apportée
How can I delete a plot among many plot in one figure?
Click "edit plot" -- the arrow next to the printer icon. Then, click on the line you want to delete and then delete it. An...

plus de 13 ans il y a | 8

Réponse apportée
relation between the fft of full and segmented signal
That's because the spacing between the DFT bins depends not only on the sampling frequency, but ALSO on the length of the input ...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
To run 'mexw32' from a script.
Hopefully you're on the correct machine for the mex file, but you just call the function without the mexw32 extension. out =...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
using convolution with matlab
With all due respect, I think you need to take some time to read the MATLAB documentation. n = 0:3; x=n.^3-n.^2; ...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
what is the purpose of the command line “y=y(1:64)”
It gives you an output signal the same length as your original signal, x. The following operations create a signal with 68 sampl...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
using convolution with matlab
Use the function conv() See the help for conv()

plus de 13 ans il y a | 0

Réponse apportée
Amplitude Probability Density Function
ksdensity() will give you an estimate of the PDF for you data. If you have a hypothesis about the distribution of your data, ...

plus de 13 ans il y a | 1

Réponse apportée
Cross correlation negative lag time
If you look at the help for xcorr(), you'll see how the inputs are lagged with respect to each other. If the A input is delayed ...

plus de 13 ans il y a | 0

Réponse apportée
create a piece of music using matlab??
Simple sine waves are not going to sound like music even if you string them together. I'm not a music expert by any stretch of t...

plus de 13 ans il y a | 0

Réponse apportée
find the mean, energy and power of cosine function
You can just do: mean(x) Ex = norm(x,2)^2 % the energy Px = 1/numel(x)*norm(x,2)^2 % power If you do...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
Period Operator Using filtfilt
The answer to what the period operator in your example does is the following. filtfilt() unlike filter() does not accept a df...

plus de 13 ans il y a | 1

Réponse apportée
Interp1 error: Can someone please help.
With the precision that you have it seems that your oldT vector is not monotonic. For example: X = 1:9; X = [X 9]; ...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
Question about making a function file with vectors and variables
If A is not a variable in the workspace, then inputting it into a function will cause an error function sumout = testfunctio...

plus de 13 ans il y a | 0

Réponse apportée
Question about making a function file with vectors and variables
MATLAB will do that on its own. >> clear A % in case A is in the workspace >> a=[1 2 A 4] The MATLAB error message will...

plus de 13 ans il y a | 0

Réponse apportée
rand integer values from an array
You can use randi index = randi(length(A(:)),1,1); A(index) for a 1-D vector, you can just do length(A), but length(A(:...

plus de 13 ans il y a | 1

| A accepté

Charger plus