Réponse apportée
loop through structures and find the correlation
I would do it slightly differently: fakeData = @(location) struct('Location',location,'AirT',rand(320,1),'SolRad',rand(320,...

environ 14 ans il y a | 1

| A accepté

Réponse apportée
writing into excel
use <http://www.mathworks.co.uk/help/techdoc/ref/xlswrite.html |xlswrite|>

environ 14 ans il y a | 0

Réponse apportée
GUI - How to make a pop-up figure prevent from modifying anything else until it's closed
Give a look at: http://www.mathworks.com/matlabcentral/fileexchange/15895-enabledisable-figure Then something fancier: http:/...

environ 14 ans il y a | 0

Réponse apportée
Is there more GUI MATLAB templates ?
For learnign I would recommend this collection: http://www.mathworks.com/matlabcentral/fileexchange/24861-41-complete-gui-exampl...

environ 14 ans il y a | 2

A résolu


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

environ 14 ans il y a

A résolu


Function Iterator
Given a handle fh to a function which takes a scalar input and returns a scalar output and an integer n >= 1, return a handle f...

environ 14 ans il y a

A résolu


Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

environ 14 ans il y a

Réponse apportée
Question about labels under each boxplot.
dados = rand(100,2) boxplot(dados,'labels',{'\bf\it{IDEB}_2_0_0_7','\bf Efficiencies'})

environ 14 ans il y a | 0

Réponse apportée
Cell array Strings help
regexp('hi harry potter',' ','split')

environ 14 ans il y a | 0

| A accepté

Réponse apportée
Identifying lab id within a parfor
Trying a simple parfor never uses more than 1 worker: matlabpool(2) parfor ii = 1:10000 if numlabs > 1 ...

environ 14 ans il y a | 0

Réponse apportée
Create Variables with a for loop
You can use cell arrays, where each cell will contain an array of potentially differrent size. An example: c = cell(10,1...

environ 14 ans il y a | 0

Réponse apportée
plotyy : align y axes at zero
A quick fix, call |plotyy| as: ax = plotyy(...) Then set limits of axes set(ax(1),'Ylim',max(get(ax(1),'Ylim')) *...

environ 14 ans il y a | 1

| A accepté

Réponse apportée
displaying values
You can use |<http://www.mathworks.co.uk/help/techdoc/ref/datacursormode.html datacursormode>| to display datatips. Check the...

environ 14 ans il y a | 0

| A accepté

Réponse apportée
mysql&MATLAB
# If you have the *Database Toolbox* check |<http://www.mathworks.co.uk/help/toolbox/database/ug/database.html database>|. # Se...

environ 14 ans il y a | 1

| A accepté

Réponse apportée
Data Sorting
I don't understand completely what you're trying to achieve, but to sort a matrix according to a certain column use |<http://www...

environ 14 ans il y a | 0

| A accepté

Réponse apportée
addts is adding an 'x' as prefix to the timeseries name
Rules for naming variables, fieldnames, etc... impose the name to start with a letter. *EDIT* It is consistent. |name| is...

environ 14 ans il y a | 0

Réponse apportée
using textscan
You have to specify the right 'format', read example 8 to get an idea: http://www.mathworks.co.uk/help/techdoc/ref/textscan.html...

environ 14 ans il y a | 0

| A accepté

Réponse apportée
Chart in MATLAB
plot(x,y) *EDIT* If you have the financial toolbox give a look at: * |<http://www.mathworks.co.uk/help/toolbox/fina...

environ 14 ans il y a | 0

Réponse apportée
Why your question is NOT "urgent" or an "emergency"!
..and you're being polite. I will link your post on the tutorial.

environ 14 ans il y a | 1

Réponse apportée
How to solve "Index exceeds matrix dimensions" error?
Because you're shrinking |filename| if the condition is verified. Once you delete a row, the length of filename is one unit s...

environ 14 ans il y a | 1

Réponse apportée
Writing slider output to data file
Your |fid| exists within the workspace of the function |cb|. You have to close it inside the function or you should return the ...

environ 14 ans il y a | 1

Réponse apportée
Warning: Integer operands are required for colon operator when used as index
Perfectly fine idx = 2.5:9; But when you use to index a position: A = rand(10,1); A(idx) There's no such a th...

environ 14 ans il y a | 0

Réponse apportée
How do we plot repetitive items simply? Can a loop and eval be used, for example? How d'you nest a string within a string?
First you have to forget about |eval|. There are very few things that can't be done without it (like swapping variables within d...

environ 14 ans il y a | 3

| A accepté

Réponse apportée
get data from workspace
A "standard" function could be considered a black box where you throw data in and get something out of it. *Once* you defined...

environ 14 ans il y a | 0

Réponse apportée
Switch case (how to use for case insensitive string check)
switch lower(str) case 'power' end Just lower the case of your control variable.

environ 14 ans il y a | 1

Réponse apportée
Function 'eq'
Please read this faq: http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F In brief,...

environ 14 ans il y a | 2

| A accepté

Réponse apportée
omitting array
I suggest you to read the chapter "Matrices and Arrays" from the <http://www.mathworks.co.uk/help/techdoc/learn_matlab/bqr_2pl.h...

environ 14 ans il y a | 0

Réponse apportée
Is it possible to control code folding with code?
I have not found a smarter way, but you could adopt the following solution, give that |test.m| contains: for ii = 1:10 ...

environ 14 ans il y a | 1

Question


Speed up recursive loop
I have the following loop which fills in a vector recursively. I need to speed it up as much as possible since it takes 60% of t...

environ 14 ans il y a | 2 réponses | 3

2

réponses

A résolu


Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

environ 14 ans il y a

Charger plus