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

6년 초과 전 | 0

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

6년 초과 전 | 1

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

6년 초과 전 | 1

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

6년 초과 전 | 0

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

6년 초과 전 | 0

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

6년 초과 전 | 0

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

6년 초과 전 | 0

| 수락됨

질문


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

6년 초과 전 | 답변 수: 1 | 1

1

답변

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

6년 초과 전 | 1

| 수락됨

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

6년 초과 전 | 0

| 수락됨

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

6년 초과 전 | 1

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

6년 초과 전 | 1

| 수락됨

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

6년 초과 전 | 0

| 수락됨

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

6년 초과 전 | 1

| 수락됨

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

6년 초과 전 | 0

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

6년 초과 전 | 3

| 수락됨

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

6년 초과 전 | 0

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

6년 초과 전 | 1

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

6년 초과 전 | 1

| 수락됨

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

6년 초과 전 | 1

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

6년 초과 전 | 0

| 수락됨

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

6년 초과 전 | 0

| 수락됨

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

6년 초과 전 | 1

| 수락됨

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

6년 초과 전 | 1

| 수락됨

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

6년 초과 전 | 0

| 수락됨

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

6년 초과 전 | 1

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

6년 초과 전 | 0

| 수락됨

질문


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

6년 초과 전 | 답변 수: 1 | 0

1

답변

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

6년 초과 전 | 0

| 수락됨

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

6년 초과 전 | 1

더 보기