Réponse apportée
sorting a matrix
To sort just a single row: A = [1 2 3 4 5 6 7 8 9]; % Sort only first row A(1,:) = sort(A(1,:),'descend'...

plus de 15 ans il y a | 0

Réponse apportée
GUIDE: Calling button press on key press
An example with _WindowKeyPressFcn_ set at the figure level. Whenever you push 'p' te action is the same pushing the button: *E...

plus de 15 ans il y a | 0

| A accepté

Réponse apportée
how to make the regression line of lsline function colored
When you add the regression line call it like this: h = lsline; set(h(1),'color','r') set(h(2),... for more ...

plus de 15 ans il y a | 4

| A accepté

Réponse apportée
Importing and transposing a Text file
Give a look at *Example 2* in <http://www.mathworks.com/help/techdoc/ref/textscan.html textscan>. Also: # Post the first 3-4 ...

plus de 15 ans il y a | 0

Réponse apportée
2D vector plot in MATLAB.
Taking the example from <http://www.mathworks.com/help/techdoc/ref/quiver.html quiver>: [X,Y] = meshgrid(-2:.2:2); Z = ...

plus de 15 ans il y a | 1

Réponse apportée
Handling excel file
Other than importing the entire excel as Matt suggest (which I would go for unless the number of rows selected is just a tiny pa...

plus de 15 ans il y a | 0

Réponse apportée
How to customize the size/font/color of characters in the command line window?
You can customize from: File > Preferences > Fonts > Custom Oleg

plus de 15 ans il y a | 0

Question


WindowKeyPressFcn and datacursormode on
In the following exampleGUI: <<http://i53.tinypic.com/ibm3v5.png>> If I set *datacursormode on* the WindowKeyPressFcn doesn't ...

plus de 15 ans il y a | 1 réponse | 0

0

réponse

Réponse apportée
How to find the same date when the serial datenum is slightly off
Index the result in the followin way: idx = abs(dates1 - dates2) < 1e-4 Set the tolerance on the RHS. Oleg

plus de 15 ans il y a | 1

| A accepté

Réponse apportée
Logical mask for a concatenated series of numbers based on document length
Check this out: st = [1 101 201]; en = [45 131 226]; idx = mcolon(st, en); data(idx) You can find *<htt...

plus de 15 ans il y a | 1

| A accepté

Question


GUI flickers when customly resized
When I select the checkbox "Show stats" the GUI is resized w/o any flicker, whereas selecting "Show buttons" causes the GUI to f...

plus de 15 ans il y a | 2 réponses | 0

2

réponses

Réponse apportée
How can I know what element a value came from in a vector?
Use the second output of <http://www.mathworks.com/help/techdoc/ref/min.html min>: [cheapest, pos] = min(cost); r(pos) ...

plus de 15 ans il y a | 0

Réponse apportée
Opening files with randomly varying file names
I propose a different approach: *EDIT: forgot about the wildcard* % Retrieve all the files in a directory names = dir('C:\...

plus de 15 ans il y a | 7

| A accepté

Réponse apportée
Converting a problem from Mathematica to MATLAB
I found this article <http://galileo.phys.virginia.edu/classes/152.mf1i.spring02/RandomWalk.htm "One Dimensional RW">, and refer...

plus de 15 ans il y a | 0

Réponse apportée
How to rename a bunch of files in a folder
I came up with the following solution: % Directory of the files d = 'C:\Users\Oleg\Desktop\New folder\'; % Retrieve th...

plus de 15 ans il y a | 1

Question


How to rename a bunch of files in a folder
I was going to _merge_ .pdf files with Adobe Acrobat when I noticed they were named as 1.pdf, 2.pdf, ..., 10.pdf, ..., 20.pdf. ...

plus de 15 ans il y a | 5 réponses | 1

5

réponses

Réponse apportée
Detect Changes in Variable
Not really clear what you want to do but the loop can be simplified as: time = 1:last; consump(time) = consump(time) + t...

plus de 15 ans il y a | 0

Réponse apportée
Connect issue to SQL Server using x64bit Matlab
# Download ans save somewhere the <http://msdn.microsoft.com/en-us/data/aa937724.aspx Microsoft SQL Server JDBC Driver 3.0>: the...

plus de 15 ans il y a | 0

Réponse apportée
Execution Time
Also, you can use the <http://www.mathworks.com/help/techdoc/ref/profile.html profiler> Oleg

plus de 15 ans il y a | 0

Réponse apportée
Bullets in MATLAB GUIs
Are you interested in uitree and uitreenodes, then give a look at this <http://undocumentedmatlab.com/blog/uitree/ undocumented ...

plus de 15 ans il y a | 0

Réponse apportée
Need help With "If" statement
See <http://www.mathworks.com/help/techdoc/ref/return.html return>, place it after: display('no') Oleg

plus de 15 ans il y a | 0

| A accepté

Réponse apportée
Saving multiple imported files
Does this solve: Spt = cell(length(files),1) for i=1:length(files) Spt(i)= {csvread(files(i).name,12,0)}; end Oleg

plus de 15 ans il y a | 0

| A accepté

Réponse apportée
What is missing from MATLAB?
Anti-aliasing... <http://www.mathworks.com/matlabcentral/fileexchange/20979 MYAA>

plus de 15 ans il y a | 8

Réponse apportée
no figure toolbar
Check if you have in your <http://www.mathworks.com/help/techdoc/ref/matlabrc.html matlabrc.m> or (if it exists) in the <http://...

plus de 15 ans il y a | 0

Réponse apportée
Profiler Paradox
The difference is due to the JIT accelerator that kicks in when using the profiler. Same is if you save the script which calcula...

plus de 15 ans il y a | 1

| A accepté

Réponse apportée
function call,,,,getting error
You're allowed to define a function only at the beginning of an .m file, then saving it and calling the function as _fcn(x,y)_ a...

plus de 15 ans il y a | 0

Réponse apportée
GUI for keyboard pressed representing the push button
A simple example which uses _KeyPressFcn_: function [] = gui() S.fh = figure('units','pixels',... 'position...

plus de 15 ans il y a | 1

Réponse apportée
How to use sscanf to read data file with two delimiter
I suggest the following approach: fid = fopen('C:\Users\Oleg\Desktop\trial.txt'); data = textscan(fid,'%s%s%f%f%f%f%f%f...

plus de 15 ans il y a | 1

Réponse apportée
Publishing in matlab
You can go this way: %% Title type('myFunc.m') %% Explanations %% Example: myFunc(1) The point here ...

plus de 15 ans il y a | 0

Réponse apportée
L U decomposition
Matlab is case-sensitive, if you want to store the output of _x_ then in the first line change _X_ to lowercase. Oleg

plus de 15 ans il y a | 1

Charger plus