Community Profile

# Jon

##### Last seen: 1 dag ago
193 total contributions since 2013

View details...

Contributions in
View by

Plot velocity profile of microfluid flow
Your use of the if elseif to determine what the appropriate function to evaluate is good, but you have a conceptual error on wha...

1 dag ago | 1

Write a function called valid_date that takes three positive integer scalar inputs year, month, day. If these three represent a valid date, return a logical true, otherwise false. The name of the output argument is valid.
I verified that your program correctly returns that valid_date(2017,9,31) is false. It looks like you are using some kind of te...

2 dagen ago | 0

How do you transfer this signal into linear form?
I see this is a follow up to your previous question which was answered in https://www.mathworks.com/matlabcentral/answers/506414...

2 dagen ago | 0

| accepted

User defined function "not enough inputs"
The error message means that when you called the function, either on the command line, or in another script, you did not provide...

2 dagen ago | 0

| accepted

How to solve a simple Matrix equation?
It looks like you want to find all of the vectors satisfying Ax = 0 for some singular matrix , A. If so, you can do this using ...

3 dagen ago | 2

| accepted

Picking the (n) th occurrence of a number in a vector or the (n)th row in a matrix.
% make a random vector of data just for example purposes x = rand(25,1); % define n for your nth element selection n = 3 % fo...

3 dagen ago | 0

| accepted

How do you separate imported data into time and amplitude?
If by detrend you mean that you want to remove the part of the signal that is growing linearly with time then the expression you...

3 dagen ago | 0

| accepted

Summing/taking weighted average within a range for a table
Let's say you have a table called T, that has a column called x. To find, for example, the sum row 10 through 18 of variable x ...

3 dagen ago | 0

How to assign an equation built by string to parameter c in nonlinear inequality constraint function for fmincon?
I don't think the approach you are following is worth pursuing further. Please see https://www.mathworks.com/help/optim/ug/pass...

3 dagen ago | 0

| accepted

how to generate a random vector with fixed sum and bounded elements
Maybe I am not understanding something, but it seems like your problem is overconstrained. You can easily make a length n vecto...

4 dagen ago | 1

| accepted

Programming and Coding for Beginners
I would strongly recommend first completing the MATLAB On Ramp. This will give you a quick general immersion in using MATLAB. La...

4 dagen ago | 0

Matlab "Index in position 1 is invalid. Array indices must be positive integers or logical values."
The error is telling you that MATLAB thinks that the variable that you call maximum is a vector, and that you want to have eleme...

4 dagen ago | 0

Faster/Simpler way to update my data in a table
Here's an approach that I think does what you want. You would have to benchmark the run time, but the approach is quite vectori...

4 dagen ago | 1

| accepted

detecting the diagonal squares that includes only zero values
I think this may be do what you want, or if not is close enough that you can modify it from here. The function emptyBoxes ret...

5 dagen ago | 0

Kinetic equation, R=R∞{1-exp(-Kt)}
It sounds like you may not be too familiar with using MATLAB at all. If you need to get going quickly at using MATLAB I would h...

5 dagen ago | 0

How to find settling time?
Here's a rough approach you might try. This code will not do the very last epoch, you could further modify to handle this spec...

5 dagen ago | 0

How to handle timer
You probably have some error in the code, PlotImage, that the timer is calling. Debugging problems in timer functions is a litt...

5 dagen ago | 0

| accepted

Not enough input arguments
The 'Not enough input arguments' error message means that when you call the function foc_cia you are not providing the correct n...

5 dagen ago | 0

How can I seperate these number from a cell and put it into a matrix.
You will not be able to put your data from the cell array you show to a matrix because you have both numeric and non-numeric dat...

8 dagen ago | 0

Error, array indices must be positive integers or logical values
In your code Df is a 2 by 200 matrix not a function. It therefore does not make sense in the last line of your code to have the ...

8 dagen ago | 0

| accepted

Negative Eigenvalues found in 12x12 Matrix
I would trust the result of the eig function. If you do not think your matrix, cor, should have negative eigenvalues, then you ...

8 dagen ago | 0

How to solve this error "Not enough input arguments."
Your function requires 4 input arguments. You must have called it with less than 4 input arguments. Please check your code where...

8 dagen ago | 0

| accepted

I cant solve linear programming
It is of course possible to have a linear programming problem that is unbounded. This happens if there are no constraints that p...

8 dagen ago | 0

How to write a for loop that creates a vector of [1:1000, 1001:2000,....,n]
Just to make Geoff's suggestion more concrete, suppose you had a length 100000 vector of data points. You could put this into a ...

9 dagen ago | 0

the meaning of basic matlab words
Are you familiar at all with "Object Oriented Programming" this is a general approach to software development used in many compu...

9 dagen ago | 0

How to only plot the better result from a loop of 48 iterations in a convergence plot?
You could do something like this, assuming that your output is in vector y and iteration number is in vector iterCount plot(ite...

9 dagen ago | 1

How to find the intersection point by plotting the red line like below?
Assuming you have the water level in a vector, lets call it h, along with the values of pExceed in another vector, you can int...

9 dagen ago | 1

How can I achieve Matrix-Vector element-wise operations in Simulink Matlab Function Block?
I'm not sure why the MATLAB Function block can not handle the implicit scalar expansion, but I just tried using an Interpreted M...

10 dagen ago | 0

| accepted

For LOOP for splitting an ECG signal into different CHUNKS
It's not really clear to me from your description what you are trying to do. From what I can infer from your description you ha...

10 dagen ago | 1

| accepted