Réponse apportée
How to do Downward peak detection?
You can use the MATLAB function islocalmin for example idx = 1:length(A) isMin = islocalmin(A); plot(idx,A,idx(isMin),A(isMin...

plus de 6 ans il y a | 0

Réponse apportée
Problem of Nonlinear Regression
If you have the Statistics and Machine learning toolbox you can use fitnlm or nlinfit see documentation https://www.mathworks.co...

plus de 6 ans il y a | 1

Réponse apportée
How to compare array's values with each other?
Staying close to what you have started here, you could put your code into a double loop, for example % assign threshold z = 10...

plus de 6 ans il y a | 1

Réponse apportée
Help deal with the loop
You do not need a loop to evaluate this type of expression in MATLAB. The beauty of MATLAB is it lets you do math directly with ...

plus de 6 ans il y a | 0

Réponse apportée
Which Matlab tools suit for substance manipulation and energy flow simulation?
The Mathworks Simulink program, is a very flexible, and powerful, block diagram oriented tool for simulating systems that can ...

plus de 6 ans il y a | 0

Réponse apportée
Is it possible to run a function that requires input variables when they are declared later in the function?
You just need to give your first function a return argument when you call it. So the definition of your first function should...

plus de 6 ans il y a | 0

Réponse apportée
Delete rows with bad data and surrounding rows
Here's another approach % script to clean data B = [0 1 0 0 1 0 1; 0 0 0 0 0 0 0; 0 1 0 0 1 0 1; 0 1 0 0 0 1 ...

plus de 6 ans il y a | 0

| A accepté

Question


How to use timetable with hierarchical data
I have made wide use of MATLAB tables for analyzing my experimental data. Since much of my experimental data is time based (meas...

plus de 6 ans il y a | 1 réponse | 1

1

réponse

Réponse apportée
Split table from database into sub-tables dependent from timestamp difference
First I would recommend making a new column in your table with the time expressed as a MATLAB datetime array, for example you co...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
How to make a loop for all participants to delete rows that contain a certain value
Your loop does not seem to make any sense Having a for loop such as for j = 1:length(DATA(ii).GAIT_INFO); means that j ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How can I create a fullpath from images of different subfolders?
Its not quite clear from the snippet of code and description you give but I think your problem is that you are not constructing ...

plus de 6 ans il y a | 1

Réponse apportée
Intersection of two linear lines in 3D
It is a little hard to follow from your desription but I'm assuming you have 2 three dimensional curves that intersect. So eac...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Splitting up data vector into matrix with weekly data separated by columns
I think the key challenge is to find the index (row number in your table) where the end of each week occurs. Here is one way you...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Pair a row index with a column index
This can be categorized as a Matching problem. In particular it can be mapped to a Matching problem on a Bipartite Graph. Let's...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Finding a max in a column and making all other elements equal to zero
I see that as I was working on this Joel had already given you an answer, but here is another approach in case it is useful % t...

plus de 6 ans il y a | 0

Réponse apportée
Timetable with 15 min averages
Try this for your fourth line (and skip your third line assigning new_times, as it is not needed with this approach) house_loa...

plus de 6 ans il y a | 3

| A accepté

Réponse apportée
Need to store each index and value from if statement inside the for loop.
You can also do all of that without any loops as follows % load the data load data % assign the y vector to the data y = d...

plus de 6 ans il y a | 0

Réponse apportée
How to save all opened window Figure (imshow) with specified name and folder?
The problem is that in your inner loop you set i = 1,2,3...7 but you are writing currentImage{k}. So the index for k does not ch...

plus de 6 ans il y a | 1

Réponse apportée
How to integrate an unbounded function?
According to the MATLAB documentation https://www.mathworks.com/help/matlab/ref/integral.html MATLAB's integral function can han...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
How to remove the outliers
Since you do not have filloutliers and rmoutliers in your version of MATLAB I would first recommend updating to a more recent ...

plus de 6 ans il y a | 1

Réponse apportée
How to convert a For loop function into an If function
First, I think when you are saying "recursive" you mean "looping". While and For loops aren't inherently recursive. A recursive ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Non linear system of equations with constraints.
If you would like to apply some inequality constraints using lsqnonlin, you could do this by creating some auxilliary variables....

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Dimensional error using PCA
The first argument to pca should be n by p, where n is the number of observations. You are supplying it with a p by n matrix. As...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Find and edit interval of array when element is equal to a value?
Here is another approach, which basically relies on an earlier contribution from Jan with a small modifications for your problem...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Numeric answer for PID command
In order to simulate the time response of a system using the MATLAB control system toolbox you can use the lsim function. Note i...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How to vary the color of a dynamic line?
I was just trying to code up an example, but when I finished I saw you already had an answer from Adam. My solultion used a simi...

plus de 6 ans il y a | 1

Réponse apportée
having problem to solve somthing in matlab
If you think about how basic matrix, vector multiplication works, you can see that you can sum rows of a matrix by multiplying b...

plus de 6 ans il y a | 0

| A accepté

Question


File attachments in MATLAB Answers open as links
When I try to download file attachments included with posts to MATLAB answers they instead open in my Chrome Web Browser. If the...

plus de 6 ans il y a | 1 réponse | 0

1

réponse

Réponse apportée
Building the legend according to user input.
It is a little hard to understand all of the details of what you are doing in your code, and what exactly you want to produce fo...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Different grid lines color in MATLAB
The grid is a property of the current axis. After you draw your figure, and add the grid, you can set the GridColor property of ...

plus de 6 ans il y a | 1

Charger plus