Respondida
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'...

más de 15 años hace | 0

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

más de 15 años hace | 0

| aceptada

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

más de 15 años hace | 4

| aceptada

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

más de 15 años hace | 0

Respondida
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 = ...

más de 15 años hace | 1

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

más de 15 años hace | 0

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

más de 15 años hace | 0

Pregunta


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

más de 15 años hace | 0 respuestas | 0

0

respuestas

Respondida
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

más de 15 años hace | 1

| aceptada

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

más de 15 años hace | 1

| aceptada

Pregunta


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

más de 15 años hace | 2 respuestas | 0

2

respuestas

Respondida
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) ...

más de 15 años hace | 0

Respondida
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:\...

más de 15 años hace | 7

| aceptada

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

más de 15 años hace | 0

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

más de 15 años hace | 1

Pregunta


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

más de 15 años hace | 5 respuestas | 1

5

respuestas

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

más de 15 años hace | 0

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

más de 15 años hace | 0

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

más de 15 años hace | 0

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

más de 15 años hace | 0

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

más de 15 años hace | 0

| aceptada

Respondida
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

más de 15 años hace | 0

| aceptada

Respondida
What is missing from MATLAB?
Anti-aliasing... <http://www.mathworks.com/matlabcentral/fileexchange/20979 MYAA>

más de 15 años hace | 8

Respondida
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://...

más de 15 años hace | 0

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

más de 15 años hace | 1

| aceptada

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

más de 15 años hace | 0

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

más de 15 años hace | 1

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

más de 15 años hace | 1

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

más de 15 años hace | 0

Respondida
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

más de 15 años hace | 1

Cargar más