답변 있음
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'...

대략 15년 전 | 0

답변 있음
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...

대략 15년 전 | 0

| 수락됨

답변 있음
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 ...

대략 15년 전 | 4

| 수락됨

답변 있음
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 ...

대략 15년 전 | 0

답변 있음
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 = ...

대략 15년 전 | 1

답변 있음
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...

대략 15년 전 | 0

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

대략 15년 전 | 0

질문


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

대략 15년 전 | 답변 수: 0 | 0

0

답변

답변 있음
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

대략 15년 전 | 1

| 수락됨

답변 있음
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...

대략 15년 전 | 1

| 수락됨

질문


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

대략 15년 전 | 답변 수: 2 | 0

2

답변

답변 있음
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) ...

대략 15년 전 | 0

답변 있음
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:\...

대략 15년 전 | 7

| 수락됨

답변 있음
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...

대략 15년 전 | 0

답변 있음
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...

대략 15년 전 | 1

질문


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

대략 15년 전 | 답변 수: 5 | 1

5

답변

답변 있음
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...

대략 15년 전 | 0

답변 있음
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...

대략 15년 전 | 0

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

15년 초과 전 | 0

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

15년 초과 전 | 0

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

15년 초과 전 | 0

| 수락됨

답변 있음
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

15년 초과 전 | 0

| 수락됨

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

15년 초과 전 | 8

답변 있음
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://...

15년 초과 전 | 0

답변 있음
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...

15년 초과 전 | 1

| 수락됨

답변 있음
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...

15년 초과 전 | 0

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

15년 초과 전 | 1

답변 있음
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...

15년 초과 전 | 1

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

15년 초과 전 | 0

답변 있음
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

15년 초과 전 | 1

더 보기