Réponse apportée
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...

environ 12 ans il y a | 0

Réponse apportée
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...

environ 12 ans il y a | 2

Réponse apportée
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...

environ 12 ans il y a | 5

Réponse apportée
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...

environ 12 ans il y a | 0

Réponse apportée
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 ...

environ 12 ans il y a | 2

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

environ 12 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 12 ans il y a | 0

Réponse apportée
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; ...

environ 12 ans il y a | 0

Réponse apportée
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...

environ 12 ans il y a | 0

Réponse apportée
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') ...

environ 12 ans il y a | 2

Réponse apportée
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.

environ 12 ans il y a | 0

Réponse apportée
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?

environ 12 ans il y a | 0

Réponse apportée
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)); ...

environ 12 ans il y a | 0

Réponse apportée
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...

environ 12 ans il y a | 0

Réponse apportée
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....

environ 12 ans il y a | 0

Réponse apportée
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...

environ 12 ans il y a | 0

Réponse apportée
Dicom-Dict.txt on MCR
fullfile(ctfroot,'toolbox','images','iptformats') ?

environ 12 ans il y a | 0

Réponse apportée
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>...

environ 12 ans il y a | 0

Réponse apportée
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...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
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))

environ 12 ans il y a | 0

Réponse apportée
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...

environ 12 ans il y a | 0

Réponse apportée
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...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 12 ans il y a | 1

Réponse apportée
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 ...

environ 12 ans il y a | 0

| A accepté

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

environ 12 ans il y a | 0

Réponse apportée
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? ...

environ 12 ans il y a | 0

Réponse apportée
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)

environ 12 ans il y a | 6

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

environ 12 ans il y a | 0

| A accepté

Réponse apportée
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:...

environ 12 ans il y a | 1

Réponse apportée
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....

environ 12 ans il y a | 0

| A accepté

Charger plus