Community Profile

# Jan

Last seen: Today Active since 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.

All

#### Content Feed

View by

Convex Hull without the in-built function.
There are many known algorithms, which can inspire you. See https://en.wikipedia.org/wiki/Convex_hull_algorithms

2 days ago | 0

I have a problem with writing data to file
The folder might be write protected. Check this in general: [fid, msg] = fopen('mn21hmya2021.csv','wt'); assert(fid > 0, msg);...

2 days ago | 0

SELECTING MATRIX ELEMENTS IN DESCENDING ORDER
This can be obtained by the 2nd output of the sort() command. A=[57 60 62 64 69 67 68 63 36 33; 52 45 25 37 49 55 58 49 39 3...

2 days ago | 0

How to write this expression in MatLab
x * exp(log(2^x)) = 1

2 days ago | 0

| accepted

Removing zeros from matrix
What is the wanted output? A = [1 2 3 4 5 6; 1 2 3 4 5 6; 1 2 3 4 5 0; 1 2 3 4 0 0; 1 2 3 0 0 0]; B1 = A; B1(B1 == 0) = NaN...

2 days ago | 0

How can I get the source code of the function rationalfit()? This function does not contain the code.
Scroll down. On the bottom of the function rationalfit.m you find the call of a core function. Either this core function contain...

2 days ago | 0

| accepted

Import files from two folders
The error message is clear: Undefined function 'Importing' This means, that this function is not visible. If it was working be...

2 days ago | 0

| accepted

Generating an average curve from 1,000 replicates of an ODE
I cannot run your code due to a missing function lhdesign, but I guess you want: avg = mean([result{:}(:, 2)], 2);

2 days ago | 0

Insert two text lines in the blank rows of a txt file
You cannot insert text in files, because a file an grow at its end only. There is no operation to shift the contents of a file. ...

2 days ago | 0

Remove value question: if previous row -row>+-3, then remove the row in matrix A
Your code contains some problems: for j = 1:size(A) Remember, that size() replies a vector containing the size of all dimensio...

3 days ago | 1

Please help me to find the errors in my code for predictor corrector method.
I do not know, what you consider as "correct" result. All I see is the running code and there is no chance to predict, what you ...

6 days ago | 0

What is the fastest way to get bit stream from 1D float data ?
I do not really get, what you try to do. Which format does the audiofile have? What do you call "bit stream"? Instead of explai...

6 days ago | 0

Need help with error in for loop
Your code tests f1<f2 and f1>f2, but not f1 == f2. In this case x1(i+1) and x2(i+2) are not created. r = (sqrt(5)-1) / 2; d = ...

7 days ago | 0

Matlab has encountered an internal problem and needs to close
Matlab R2014a is not compatible with Windows 10. See https://www.mathworks.com/support/requirements/previous-releases.html R20...

8 days ago | 0

created file does not appear?
Are you searching in the correct folder? What does cd tell you? Or do you save the file with an absolute path? Maybe you are ...

8 days ago | 1

| accepted

how can i solve this ?
"Phimean=51*1" means, that this variable has the sie [51, 1]. After Vp=reshape(Vp,size(Phimean)); Cp has the same size also....

8 days ago | 0

matching the element of matrix with an array
A = {[2,3;2,7], [3,2;3,4;3,8], [4,3;4,5], [5,4;5,10], [7,2;7,8;7,12]}; B = [17,8,14,4,18] C = cell(size(A)); for iA = 1:numel...

10 days ago | 1

| accepted

How can i make this code block a function?
A simplified version of your code: function y = my_conv(x, h) z = x(:) .* h; [r, c] = size(z); y = []; for t = 2:r+c ...

10 days ago | 0

why is this function running infinitely?
% Simplified version: Master1 = eye(22,22); Master1(1, 1) = 0; Master1(22, 22) = 0; scan = 3; temp = Master1; i ...

10 days ago | 0

where in my code I am thinking wrong?
length() is fragile: It uses to longer dimension. You cannot be sure if your table has more rows than columns. Use height() inst...

10 days ago | 0

save the output data of GUI
Kp = getappdata(0, 'Kp'); Kr = getappdata(0, 'Kr'); if isfile('myData.mat') % older: exist('myData.mat','file') S = ...

10 days ago | 1

| accepted

use of global variables
I agree with John, Rik and Stephen, and dare to post this as an answer. Can global variables be used in this way? Maybe. The a...

10 days ago | 0

Is it possible that the "m. file" code is converted from the double precision to the single precision??
This function has been developped an tested since 1995. You cannot be sure, if it works correctly with singles as inputs. conve...

10 days ago | 0

| accepted

Hi, what does ; exactly mean?
Please read the Getting Started chapters of the documentation. This is recommended for beginners also: https://www.mathworks.com...

10 days ago | 1

for loop return answer in string matrix
Ci = randn(5, 4); pool = ["False", "True"]; a = pool((Ci > 0) + 1)

11 days ago | 0

Importing .dat file into MATLAB
Searching for more information on the given page I've found: Note: See the PDS JADE SIS Document for more details on the format...

13 days ago | 0

Random matrix with no repeats in rows and columns.
Create the matrix elementwise. Choose a random element from the available elements. Exclude elements on top and left of the elem...

13 days ago | 1

| accepted

how to use mod function
mod() requires 2 inputs. You provide one only in the callback.

14 days ago | 0