已回答
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...

11 years 前 | 0

| 已接受

已回答
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);

11 years 前 | 0

| 已接受

已回答
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:...

11 years 前 | 0

已回答
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...

11 years 前 | 4

已回答
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

11 years 前 | 1

| 已接受

已回答
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...

11 years 前 | 1

| 已接受

已回答
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...

11 years 前 | 0

已回答
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

11 years 前 | 0

已回答
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...

11 years 前 | 0

| 已接受

已回答
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...

11 years 前 | 0

已回答
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) = [];

11 years 前 | 0

| 已接受

已回答
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

11 years 前 | 0

| 已接受

已回答
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...

11 years 前 | 0

已回答
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...

11 years 前 | 0

已回答
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...

11 years 前 | 0

| 已接受

已回答
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 ...

11 years 前 | 0

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

11 years 前 | 0

| 已接受

已回答
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...

11 years 前 | 0

| 已接受

已回答
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...

11 years 前 | 0

已回答
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...

11 years 前 | 0

已回答
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...

11 years 前 | 0

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

11 years 前 | 0

已回答
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...

11 years 前 | 0

已回答
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...

11 years 前 | 0

已回答
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...

11 years 前 | 3

| 已接受

已回答
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...

11 years 前 | 0

已回答
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...

11 years 前 | 0

| 已接受

已回答
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...

11 years 前 | 1

| 已接受

已回答
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...

11 years 前 | 0

已回答
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...

11 years 前 | 1

| 已接受

加载更多