Réponse apportée
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)

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 1

Réponse apportée
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 = [...

plus de 7 ans il y a | 0

| A accepté

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

plus de 7 ans il y a | 1

Réponse apportée
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...

plus de 7 ans il y a | 0

Réponse apportée
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 ...

plus de 7 ans il y a | 0

A résolu


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

plus de 7 ans il y a

Réponse apportée
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 ...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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;...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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);...

plus de 7 ans il y a | 0

| A accepté