Respondida
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...

alrededor de 12 años hace | 0

| aceptada

Respondida
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);

alrededor de 12 años hace | 0

| aceptada

Respondida
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:...

alrededor de 12 años hace | 0

Respondida
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...

alrededor de 12 años hace | 4

Respondida
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

alrededor de 12 años hace | 1

| aceptada

Respondida
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...

alrededor de 12 años hace | 1

| aceptada

Respondida
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...

alrededor de 12 años hace | 0

Respondida
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

alrededor de 12 años hace | 0

Respondida
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...

alrededor de 12 años hace | 0

| aceptada

Respondida
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...

alrededor de 12 años hace | 0

Respondida
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) = [];

alrededor de 12 años hace | 0

| aceptada

Respondida
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

alrededor de 12 años hace | 0

| aceptada

Respondida
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...

alrededor de 12 años hace | 1

Respondida
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...

alrededor de 12 años hace | 0

Respondida
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...

alrededor de 12 años hace | 0

| aceptada

Respondida
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 ...

alrededor de 12 años hace | 0

Respondida
Creating a polynomial data set
you can do tide_new = feval(poly3,time); % adjusted tide height

alrededor de 12 años hace | 0

| aceptada

Respondida
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...

alrededor de 12 años hace | 0

| aceptada

Respondida
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...

alrededor de 12 años hace | 0

Respondida
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...

alrededor de 12 años hace | 0

Respondida
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...

alrededor de 12 años hace | 0

Respondida
how to find shortest path between 2 nodes
you can use graphshortestpath http://www.mathworks.com/help/bioinfo/ref/graphshortestpath.html

alrededor de 12 años hace | 0

Respondida
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...

alrededor de 12 años hace | 0

Respondida
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...

alrededor de 12 años hace | 0

Respondida
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...

alrededor de 12 años hace | 3

| aceptada

Respondida
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...

alrededor de 12 años hace | 0

Respondida
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...

alrededor de 12 años hace | 0

| aceptada

Respondida
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...

alrededor de 12 años hace | 1

| aceptada

Respondida
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...

alrededor de 12 años hace | 0

Respondida
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...

alrededor de 12 años hace | 1

| aceptada

Cargar más