Respondida
Extracting data from several txt files
Use the Import Tool (right click on one of the files and select "Import Data"). Select the range that you want and then under t...

alrededor de 12 años hace | 0

Respondida
How to generate a single vector of block-consecutive values from 2 vectors of same size without a loop ?
There's also <http://www.mathworks.com/matlabcentral/fileexchange/29854-multiple-colon FEX:mcolon> which does exactly what you'r...

alrededor de 12 años hace | 2

Respondida
How to make a linear regression line?
If you go to "Tools" -> "Basic fitting" in the figure window you can add the line and the equation: <</matlabcentral/answer...

alrededor de 12 años hace | 5

Respondida
Getting Date from fints object
You can index into the date using . notation: data = [1:15]' dates = [today:today+14]' tsobjkt = fints(dates, data) tsob...

alrededor de 12 años hace | 0

Respondida
Error: Undefined function 'minus' for input arguments of type 'cell'
You cannot subtract cell arrays. Perhaps you meant to subtract the contents of the cell array? % Two cells C = {1} C2 ...

alrededor de 12 años hace | 2

Respondida
How do I sum a number with only the top row of the matrix?
x(1,:) = x(1,:) + -10

alrededor de 12 años hace | 1

| aceptada

Respondida
How to change both the axis value ranges
Set the _'XTick'_ and _'XTickLabel'_ manually sphere set(gca,'XTick',linspace(-1,1,6)) set(gca,'XTickLabel',cellstr(strca...

alrededor de 12 años hace | 0

Respondida
How to repeat the rows of a matrix by a varying number?
I'd expect a |for|-loop to be faster than building and converting a cell array. Here is a pure indexing approach: A=[2 1; ...

alrededor de 12 años hace | 0

Respondida
Can we use any other variable than symbolic to solve an equation?
What are you trying to do with it? If double precision is not enough, look into John's <http://www.mathworks.com/matlabcent...

alrededor de 12 años hace | 0

Respondida
Include Simulink model Image when publishing an mfile
You can use |open_system| to open the system. Then publish will handle it automagically: %% open_system('vdp') ...

alrededor de 12 años hace | 2

Respondida
How can I efficiently perform a curve fitting a large number of times without a constant 'for loop'?
If you have the Optimization Toolbox, use |lsqcurvefit| rather than fit. It will be faster.

alrededor de 12 años hace | 0

Respondida
integration of (1/x-x)^alpha
1./1-1 yields a 0 and then 0 raised to any negative power is inf. What do you expect at 1?

alrededor de 12 años hace | 0

Respondida
Calling out data that loops back around
Find the index of the maximum x value and keep everything from then on out: x = [1:10 10:-1:1]; y = flip(cumsum(x)); ...

alrededor de 12 años hace | 0

Respondida
How can I copy the metadata from one dicom to another?
Perhaps I'm missing something, but can't you read the image in and then write it out with modified info? For example: in...

alrededor de 12 años hace | 0

Respondida
how can I get currency exchange from yahoo finance and google finance?
You'll want to specify the date ranges to yahoo's fetch: <http://www.mathworks.com/help/releases/R2014a/datafeed/yahoo.fetch....

alrededor de 12 años hace | 0

Respondida
any logic to do this programming on random number
I would take a different approach. First generate the 30 numbers who you must sum to: xsum = rand(1,30)+3.55; Now gener...

alrededor de 12 años hace | 0

Respondida
Dicom-Dict.txt on MCR
fullfile(ctfroot,'toolbox','images','iptformats') ?

alrededor de 12 años hace | 0

Respondida
Extract data from excel using heading
Use a |table|, that way you can index by variable name. <http://www.mathworks.com/help/releases/R2014a/matlab/ref/table.html>...

alrededor de 12 años hace | 0

Respondida
sub2ind, picking specific values from a 3d matrix
|sub2ind| is slow, if you want performance, use a |for|-loop. % Data X = randn(500,8,4); % z Y = randi(8,500,1); % id...

alrededor de 12 años hace | 0

| aceptada

Respondida
How to extract a number of diagonals of a matrix
Or |triu| and |tril| x = magic(10); n = 3; x = x(tril(ones(size(x)),n)&triu(ones(size(x)),-n))

alrededor de 12 años hace | 0

Respondida
Making a splash Screen for my Gui program
In R2014a, you can select a custom splashscreen icon in the application compiler app: <http://www.mathworks.com/help/releases...

alrededor de 12 años hace | 0

Respondida
Is there a tool/method to determine the versions of Matlab my code is compatible with.
The release notes have all of the changes mentioned: web(fullfile(docroot, 'matlab/release-notes.html')) (or <http://www...

alrededor de 12 años hace | 0

| aceptada

Respondida
Calculate max(diff(A)) fast and memory efficient.
You could do a hybrid approach and loop from 1:4 (or 10 or whatever), calculate max(diff(x(of that range of x)) and then keep th...

alrededor de 12 años hace | 1

Respondida
what's the program mistake?
w = sym(zeros(3,1)) You preallocated w as a numeric type and then tried to stuff a sym into it. If you preallocate w as a ...

alrededor de 12 años hace | 0

| aceptada

Respondida
Maximisation of a box cut on 4 sides
Something like: V = @(x)-(20 - 2*x)*(30 - 2*x)*x x = fminunc(V,0)

alrededor de 12 años hace | 0

Respondida
after fundamentals what is the next course for a physics student?
How about getting a book on finance, making millions of dollars, and then doing whatever you find to be the most interesting? ...

alrededor de 12 años hace | 0

Respondida
Remove zeros and perform calculation with non-zero elements
Extract the elements in C where B is nonzero D = C(B~=0) Extract the nonzero elements of B into D D = nonzeros(B)

alrededor de 12 años hace | 6

Respondida
Data storage using structures/cells
I might look into how they did it here: <http://www.mathworks.com/matlabcentral/fileexchange/15728-timesplitrinex> But yes...

alrededor de 12 años hace | 0

| aceptada

Respondida
Keyboard shortcut to evaluate current line?
I don't know of this option but I do understand the use-case and agree that it would be valuable. Here's how I do it right now:...

alrededor de 12 años hace | 1

Respondida
GUI does not recognize existing handles after using addlistener
More than likely the second figure is created because you use one of the |get current *| functions: gcf gca gco etc....

alrededor de 12 años hace | 0

| aceptada

Cargar más