Community Profile

photo

Jan


12,533 2009 年以降の合計貢献数

It is easier to solve a problem than to guess, what the problem is.

Questions about FileExchange submissions are welcome - get my address from the code. I do not answer mails concerning questions in the forum.

Jan's バッジ

  • Personal Best Downloads Level 4
  • Editor's Pick
  • First Review
  • 5-Star Galaxy Level 5
  • First Submission
  • Grand Master
  • Revival Level 4
  • 36 Month Streak
  • Thankful Level 4
  • Knowledgeable Level 4
  • First Answer
  • Promoter
  • Commenter
  • Solver

詳細を表示...

貢献した分野
表示方法

回答済み
MEX passing Integer - wrong results
This sounds magic. Whenever magic things appear in discussions in the forum, or at programming in general, it is a secure signal...

3日 前 | 2

回答済み
how to avoid for loop
A ,ore efficient version of the loop: nb = numel(b) - 1; counts = zeros(1, nb); % Pre-allocation!!! for i = 1:nb co...

9日 前 | 0

| 採用済み

回答済み
Using matlab to find vectors that are orthogonal to another vector.
Do you mean 2D vectors? v = rand(1, 2) % Any test vector vp = [-v(2), v(1)] dot(v, vp) % Orthogonal means: dot pro...

9日 前 | 0

| 採用済み

回答済み
11221 212211 212 12 1
Please post an exact copy of the error message in the forum. A rough paraphrasing will hide important details. Thanks. I assume...

9日 前 | 0

回答済み
faster way to add many large matrix in matlab
The main time is spent in rand() in your example. With using ones() instead, the runtime goes from 0.71 sec to 0.25 sec on my ma...

11日 前 | 0

| 採用済み

回答済み
Convert CurrentPoint to X and Y Value.
I guess that you do not want the coordinates relative to the figure, but relative to the data in an AXES object. Then: CP = get...

11日 前 | 3

回答済み
P files cannot be analyzed to find their dependencies. Please add P file dependencies manually
I'd start with a web search: Ask your favorite search engine for "Matlab get dependencies of P file". You will find e.g.: https...

約1ヶ月 前 | 2

| 採用済み

回答済み
Is it possible to concatenate structures with the same fields in to one super structure?
Or with a loop: function S = CatStructFields(S, T, dim) fields = fieldnames(S); for k = 1:numel(fields) aField = field...

約1ヶ月 前 | 3

回答済み
Query in applying If command
if (abs(G(j)-O(:))<1) The if command needs a scalar condition. Therefore Matlab inserts an all() to evaluate the vector G(j)-O(...

約2ヶ月 前 | 0

回答済み
Index in position 1 exceeds array bounds (must not exceed 5).
The variable tab has the dimensions 5 x 10. You try to access the indices [100, 5, 10]. This cannot work. I guess, you want to r...

約2ヶ月 前 | 0

回答済み
How to Assign vectors to each dynamic variable name?
Don't do this. See: TUTORIAL: How and why to avoid Eval Hiding an index in the name of variables is a bad idea. Use arrays ins...

約2ヶ月 前 | 3

回答済み
Can I construct a matrix multiplying a scalar and a vector?
No, tis is not a standard multiplication. But you can create k based on i and j: i = 3; j = [4; 5]; % Solution 1: k(:, 2) ...

2ヶ月 前 | 1

| 採用済み

回答済み
How can I maximize a function in Matlab?
Matlab contains some tools for minimization. A maximization does exactlly the same, if you change the sign of the optimization c...

2ヶ月 前 | 1

| 採用済み

回答済み
How do I access a certain directory?
You can define the path of a file to access it: Folder = 'C:\Temp\'; FileList = dir(fullfile(Folder, '*.jpg')); for iFile = 1...

2ヶ月 前 | 2

回答済み
how can i solve this ,can anyone provide me with code? whats wrong with my code ?
function valid = valid_date(year, month, day) % scalar positive integer limit if isscalar(year...

2ヶ月 前 | 3

回答済み
i wanted the slope with respect to time frame
Maybe all you need is to call the gradient(X.') function, where X is the complete matrix?

2ヶ月 前 | 1

回答済み
Efficient way to rename files adding prefix from higher rank folder
% Assuming that the Subject_folder's are contained in D:\Your\Folder\ : BasePath = 'D:\Your\Folder\'; BaseLen = length(BasePa...

2ヶ月 前 | 0

回答済み
Save figure as jpg with 600dpi
saveas('figure.jpg') The first input must be the handle of a figure. print(gcf, 'figure.jpg', '-jpg', '-r600'); There is no '...

2ヶ月 前 | 0

| 採用済み

回答済み
i am not able to debug because my window is not showing the debug points
Did you try to create the debug points by clicking in the area behind the line numbers? The file has not been saved. So save it...

2ヶ月 前 | 0

| 採用済み

回答済み
How to shorten space between space in command window
Avoid the \t for formatting the output if you want to get nice ASCII tables. Prefer to define the width: fprintf('%s%10d%10d%10...

2ヶ月 前 | 0

回答済み
If else Statement in GUI
I guess, that Matlab does exactly what it is expected to do. If h(a)*h(b)>0 is false, Matlab enters the else branch. Although y...

2ヶ月 前 | 0

回答済み
how to resolve this "not enough input arguments" from the code shown below
objFun=@(mag)summ Now calling objFun calls summ without input arguments. I assume, you mean: objFun = @summ which is a more e...

2ヶ月 前 | 0

回答済み
Create a for cycle over an array
Do not create a bunch of variables with an index hidden in the names: See TUTORIAL: Why and how to avoid Eval I assume all you ...

2ヶ月 前 | 0

| 採用済み

回答済み
why do i get Nan as output?
Use te debugger to determine the first occurrence of a NaN. Type this in the command window: dbstop if naninf Then run the cod...

2ヶ月 前 | 0

| 採用済み

回答済み
Why is vectorization faster than the parallel computing?
It depends on the problem. Parallelization is not trivial. If you use e.g. 16 cores and write the results in neighboring element...

2ヶ月 前 | 1

| 採用済み

回答済み
How it works : Bilinear interpolation for image resizing
According the the documentation: "the output pixel value is a weighted average of pixels in the nearest 2-by-2 neighborhood" T...

2ヶ月 前 | 0

回答済み
Workaround for matrix dimension error
Hints: Avoid repeated code. Prefer: brtn = 255 * get(handles.slider1, 'Value'); instead of writing 255*brtn whenever brtn is ...

2ヶ月 前 | 1

| 採用済み

回答済み
how to reduce the size of checkbox
This will not work realiably. Even the OS can change the sizes of specific GUI elements. Use an uitable instead, (see Fabienne's...

2ヶ月 前 | 0

回答済み
How to clear (not close) all the opened figures?
function clfall FigList = findall(groot, 'Type', 'figure'); for iFig = 1:numel(FigList) try clf(FigList(iFig)); ...

2ヶ月 前 | 0

| 採用済み

回答済み
Calling sub-function (local function) from another file on Matlab
This would work: % main.m file: ----------- function out = main(Command, varargin) switch Command case 'sub_function' ...

2ヶ月 前 | 0

Load more