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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 4

Beantwortet
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

mehr als 12 Jahre vor | 1

| akzeptiert

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

mehr als 12 Jahre vor | 1

| akzeptiert

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

mehr als 12 Jahre vor | 0

Beantwortet
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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

| akzeptiert

Beantwortet
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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 1

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 3

| akzeptiert

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 0

| akzeptiert

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

mehr als 12 Jahre vor | 1

| akzeptiert

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

mehr als 12 Jahre vor | 0

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

mehr als 12 Jahre vor | 1

| akzeptiert

Mehr laden