Réponse apportée
audio cutter in matlab
You can do something like this: If 1 second removed from end: [Y,FS,NBITS] = wavread('file.wav'); % Your file name num...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
How to find 4 minimum values from an array?
Lets say your array A (a mX1 and 1Xm) matrix (I am assuming). Then, Y = sort(A); val = Y(1:4);

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
How to create the definite cycle and to display the result of a cycle in a single matrix of a definite size?
Here is a simpler way to do this: A = eye(7).*repmat(1:7,7,1); [x,y] = size(b); m = zeros(7*x,7*y); for i = 1:...

plus de 12 ans il y a | 0

Réponse apportée
Is there any concept like dictionary or hash tables in matlab like in Python?
There is container.map http://www.mathworks.com/help/matlab/ref/containers.mapclass.html which is similar to dictionary in pyth...

plus de 12 ans il y a | 4

Réponse apportée
replacing ascending numbers with continous numbers
A = [4 20 35 22 10 49]; B = 1:numel(A); [~,C] = sort(A); B(C) = B; % Your vector

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
Generating a basic animation of a 2D figure
something like this: figure(1) Square = [0,0,2,2;0,2,2,0]; fill(Square(1,:),Square(2,:), [1 0 .7]) title('Square A...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
Creating a sparse vector inside a for loop.
The sparse matrix is slow but effective for huge matrixes with a lot of zeros. but MATLAB can handle big matrixes in normal w...

plus de 12 ans il y a | 0

Réponse apportée
How to plot the max and min of a data set on a bar plot that is constructed from mean values ?
Something like this might work for you: http://www.mathworks.com/matlabcentral/fileexchange/30639-bar-chart-with-error-bars

plus de 12 ans il y a | 0

Réponse apportée
fsolve not working, always say near zero?
type volatility This is the variable that you stored the solution. I just tested it. The volatility comes to be 1.1195 w...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
how can i generate a random number out of a range??
A = [1/rand -1/rand]; r = A(randi(2)); (or) r = [1/rand -1/rand]*(randperm(2,2) -1)'; Either will generate a ran...

plus de 12 ans il y a | 0

Réponse apportée
How to get the frequency of a column of values
table = tabulate(A); % where A is your data % if you want exactly the way you said table(:,3) = [];

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
How to create a fzero loop to find roots of a function file?
for y= 2:0.1:10 x = fzero(@(m) Y(m,y),4); end

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
Undefined function 'de2bi' for input arguments of type 'double'.
I think I know why this is happening. de2bi function belongs to 'communication system toolbox'. This toolbox is most likely n...

plus de 12 ans il y a | 1

Réponse apportée
When does the error Matrix dimension exceeds comes?
for whichever matrix you are applying (x-d:x+d,y-d:y+d), can you first do a whos A to check if the size of the array is...

plus de 12 ans il y a | 0

Réponse apportée
How to find implied volatility using "solve"?
You create a new function: function F = myfunc(vol,C,Interest, Stock, StrikePrice, TimeToMaturity) F = C - bs(Interest,v...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
Error using horzcat in a for loop
I think I figured it out. This error must be occurring not everytime. The thing that if you run this few time, the size of z ...

plus de 12 ans il y a | 0

Réponse apportée
Creating a polynomial data set
you can do tide_new = feval(poly3,time); % adjusted tide height

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
How to "solve" a "function"
The issue here is that you cannot reverse engineer this kind of function. If you know the average and lets say you know the size...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
horzcat CAT arguments dimensions are not consistent.
The problem is in [mfcc_kaszel; [c sp_bw sp_centroid sp_rolloff shortte zerocr]] [c sp_bw sp_centroid sp_rolloff shortt...

plus de 12 ans il y a | 0

Réponse apportée
how to call multiple binary images in for loop?
A = {'Image1.jpg','image2.jpg' ..... etc 'image9.jpg'}; % Store the names of all 9 image files. for i = 1:9 B = imread...

plus de 12 ans il y a | 0

Réponse apportée
How do i redraw a graph when a button is pressed in GUI?
If you're using GUI, the axes where you're plotting must have a handle. you can find it in your .fig file. In general that would...

plus de 12 ans il y a | 0

Réponse apportée
how to find shortest path between 2 nodes
you can use graphshortestpath http://www.mathworks.com/help/bioinfo/ref/graphshortestpath.html

plus de 12 ans il y a | 0

Réponse apportée
Reduction of code lines
Its a good code. The only place I think there is a chance is a=512; b = a^2/16; c=(sqrt(b)-1)/2; ft11 = fftshi...

plus de 12 ans il y a | 0

Réponse apportée
I have just joined iversity course of Monte Carlo Methods in Finance. How do i download matlab and licence?
Most university have university licenses. Ask your professor who is giving the course or look into you IT webpages. If your u...

plus de 12 ans il y a | 0

Réponse apportée
Celsius to Fahrenheit or vice versa
disp('This program convert Celsius to Fahrenheit'); Celsius=input('Write a temperature in Celsius and you''ll have the resu...

plus de 12 ans il y a | 3

| A accepté

Réponse apportée
Only check if statement once, or, disable code block after 1 check
This kind of optimization would really depend on your code. There is no generalization for this (to my knowledge). If you pos...

plus de 12 ans il y a | 0

Réponse apportée
Problem using function with fminsearch
Use your function like this function res = Yfit_func(A,Y,X) Yfit = A(1)./(1+(X/A(2))); res = sum((Y-Yfit).^2); end...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
simultaneous curve fitting using "fmincon"
This is because you have GradObj On but your function does not provide gradient vector. Try something like this: options...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
how to accomplish the adddata function in plottools ?
This is a two part question: #1 How to get the data from GUI to workspace - Answered Here - https://www.mathworks.com/matlabc...

plus de 12 ans il y a | 0

Réponse apportée
about plottools,for add data function ,the variables in GUI is not visable
You can use assignin('base','_variablename',variable) For more about assignin - http://www.mathworks.com/help/matlab/ref/assi...

plus de 12 ans il y a | 1

| A accepté

Charger plus