Answered
creating a row vector containing values between 1 and 6, each repeated exactly 4 times
Hello, You can try this a = 1:6; b = repmat(a,1,4)

5 years ago | 0

| accepted

Answered
Removing adjacent duplicate numbers in rows of a matrix
Hello, In your problem, you may get error since your result is not a matrix (number of colume of the first row is different wi...

5 years ago | 1

Answered
add two matrixes with different dimensions line by line
Hello, So, it coul be like that clear a = [2 3;1 3;2 4] PosPath =[ 1 -1;0 -1;-1 -1; 1 0; -1 0; 1 1; 0 1; -1 1]; c = [...

5 years ago | 0

| accepted

Answered
How to use variables in regular expressions?
Hello, Here is a simple way that you can use n = length(DIR); result = songdir(n:end)

5 years ago | 0

Answered
how to calculate the integral of the area difference between these two curves?
Hello, Here is my suggestion that can be done by trapz. First, you use trapz to calcultate integral of "blue" line with dB fr...

5 years ago | 0

Answered
I want a label for each plot but my code to do so is not working....any tips?
Hello, Here is my suggestion. You could create a new variable name "text" like text = sprintf('transducer %d', i) where ...

5 years ago | 0

Solved


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

5 years ago

Answered
Index exceeds the number of array elements
Hello, I have tried to run you code. I regconized that after the loop j = 2 the "errorTL = 2.0201e-06" that is smaller then ...

5 years ago | 0

| accepted

Answered
Identifying the repeated rows in a matrix and comparing them to another matrix
Hello, you can refer my answer as follows clear A= [4 4; 2 3; 4 2; 3 3; 2 3; 1 3; 3 3]; B=[1 1; 2 1; 3 1; 4 1; 1 2; 2 2;...

5 years ago | 1

| accepted

Answered
Trying to do an integral
Hello, The problem is that if you use symbolic "y" and "h" in your way, it will not give you the result. But if you put "h" e...

5 years ago | 0

Answered
Finite Difference Coding Mistake
In your code, there was a mistake, %define transport matrix % At=zeros(N,N); % At=At+diag(ones(N-1,1),1); % At=At-diag(on...

5 years ago | 0

| accepted

Answered
Calculate average of specific values in one table column
Hello, Here is one solution that you can use a = ... [8 1e-05 0.0001 8e+09 9 1e-05 0.0001...

5 years ago | 0

Answered
How do I use GlobalSearch to solve the minimal problem of a customized function with two outputs
Hello I will give an example of find minimum value of objective function First, we can create the objective function, name...

5 years ago | 0

| accepted

Answered
How to read a term of the file
Hello, Here is a solution that you can refer: clear format long a = readtable('force1.dat','HeaderLines',4); b = a(:,4);...

5 years ago | 0

| accepted