Réponse apportée
How to put a variable equal to a vector in an if cycle
My guess % your data TIMEFAILURECOG= [2 4 10 50]; Matrixdiff=[0,TIMEFAILURECOG]; DIFFERENCE=diff(Matrixdiff); INDEXCOG1=fin...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Invalid indexing when simplifying a symbolic expression
C is used as a function C(k3r+k4f)

plus de 6 ans il y a | 0

Réponse apportée
Could anyone help me to solve the issue.
For your case NN = mat2cell(A,[1 1 1],2) A bit more general NN = mat2cell(A,ones(size(A,1),1),size(A,2))

plus de 6 ans il y a | 0

Réponse apportée
how to plot a fitness or objective function with optimum values
objFun = @(x)100.*(x(:,1).^2 - x(:,2)).^2 + (1 - x(:,1)).^2; conFun = @(x)[x(:,1).*x(:,2)+x(:,1)-x(:,2)+1.5, 10-x(:,1).*x(:,2...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Multi-objective optimisation using results from external simulation
Look at this video https://www.youtube.com/watch?v=Lgjf0vWl7Ik it seems the author is doing a similar data exchange between Di...

plus de 6 ans il y a | 0

Réponse apportée
Recall elements inside the rows of a matrix based on a predefined array
A = M(V,:);

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
how to draw a 3d surface of exp(x+iy)
Suppose that you want to plot the magnitude of the exp(z) % setup the range of your plot in x and y (-2,2) and the resolution (...

plus de 6 ans il y a | 1

Réponse apportée
could anyone help me how to display the position of all the numbers present in matrix.
[iRow, jCol, value] = find(A); then you can put them in a matrix, if you like position = [value, iRow, jCol];

plus de 6 ans il y a | 1

Réponse apportée
could anyone help me to calculate the euclidean distance for the matrix.
I have found that this is usually the fastest way, since the square of the binomial is unrolled D = sqrt(abs(bsxfun(@plus,sum(A...

plus de 6 ans il y a | 0

Réponse apportée
Take values from an matrix automatically.
Prog_old = Prog; % modify Prog as desired Prog = Prog*2; % dummy operation % reload the old version Prog = Prog_old;

plus de 6 ans il y a | 0

Réponse apportée
picking up data file in each iteration
Following Stephen link numFiles = 200; for k = 1:numfiles fileName = sprintf('s%d.mat', 1008+10*k); data = load(fileNa...

plus de 6 ans il y a | 1

Réponse apportée
Filling gaps in time series with Nan
For the particular case % preliminary setup newData = [1:10; NaN(1,10)]'; % fill-in newData(data(:,1),2) = data(:,2) To m...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Removing char in a mixed string column so only numerical values are left?
Check erease erease(yourString,'LED');

plus de 6 ans il y a | 1

Réponse apportée
Separating of succecive monotonic vectors
Let's assume your data are stored in x and y vectors. I take them from your picture % get the data from picture fig = gcf; ax...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How to stop annoyed messages in command window?
I have a similar problem with Mac because I installed a package to manage split screen, named BetterSnapTool. For Linux, see if...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Make a program to convert a number to decimal, octal, hexadecimal and binary value
You can use the functions bin2dec dec2bin hex2dec dec2dex and the more general dec2base base2dec

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How to assign a different name of a matrix for each iteration?
Don't use this sintax (for details, see https://www.mathworks.com/matlabcentral/answers/304528-tutorial-why-variables-should-not...

plus de 6 ans il y a | 2

| A accepté

Réponse apportée
remove specific rows by referencing on the first digit of each row.
index = 1; % A(:,1) == index finds the rows with specific value (logical indexing) B = A(A(:,1) == index,:)

plus de 6 ans il y a | 0

Réponse apportée
delete and insert entries in a vector
If A is a matrix, I assume you have column vectors, if not, please provide A % your (column) vector c = [1 1 3 4 5 6 7 8 11 10...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
combining different size arrays based on time dimension and compute average for the last column
find rows in M2 that are present in M1 (assuming that all rows in M2 are present in M1 [~,iRows] = ismember(M2(:,1:4),M1(:,1:4)...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Sort of peak analysis
If the signal is not too noisy you can work with ‘diff’ and look for the change of sign

plus de 6 ans il y a | 1

Réponse apportée
How to improve the accuracy of lu decomposition?
It's a weird way to check the accuracy. What about checking the norm of the residual % data N = 5; A = rand(N)+eye(N)+1j*rand(...

plus de 6 ans il y a | 0

Réponse apportée
How to write a matlab function to find largest jump between consecutive vectors without using max or min
Try xd = abs(diff(x)) [K,y] = max(xd)

plus de 6 ans il y a | 0

Réponse apportée
matrix multiplication for "3-D" matrices
Let's start saying that the data structure you are using is not the best one. See https://www.mathworks.com/matlabcentral/answer...

plus de 6 ans il y a | 0

Réponse apportée
MATLAB doesn't let me plot 3 graphs in the same plot
As Guillame pointed out, you just have to plot them (without the indexing): h = figure; hold on, grid on plot(t,v); plot(t...

plus de 6 ans il y a | 0

Réponse apportée
MATLAB doesn't let me plot 3 graphs in the same plot
The problem is here plot(tm,ve(i+1),'green') ... plot(tn,vi(i+1)) ve(i+1) is a number, as well as vi(i+1), while tm and tn a...

plus de 6 ans il y a | 0

Réponse apportée
Best way to calculate the determinants of a series of matrices?
Not sure if it you can speedup your code, but a single line code to do the job is Delta = arrayfun(@(i)det(squeeze(G(i,:,:))),1...

plus de 6 ans il y a | 0

Réponse apportée
Compute execution time without printing statement?
You can just save the value in a variable timerValue = tic; % something very useful to do tstop = toc(timerValue);

plus de 6 ans il y a | 0

Réponse apportée
Extract data in a single vector after a FOR cycle
Ciao, You can try to reshape your data, then apply max on the columns media_reshape = reshape(media,85,113); max_media = max(...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Comparing Duration Arrays is time consuming - How to improve my script?
Not sure if I understand correctly the problem without data. I try: idx = find(clock > tdur(1),1,'first')

plus de 6 ans il y a | 0

| A accepté

Charger plus