Réponse apportée
How can I extract a signal between zero up-crossings
You can take a look at this post, where zero crossing is discussed in details https://it.mathworks.com/matlabcentral/answers/26...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Unique ID Min and Max with multiple values per Unique ID
Tessa, look if this fits your problem % col vector M1 = [10 17 201 333 1000].'; M2 = [10 10 17 17 17 201 1000; 0.1 69 1.7 33...

plus de 6 ans il y a | 0

Réponse apportée
split dataset with probability weights
datasample has a two outputs, where the second is the index to the selected data in your npop1. So: [rw1,idSelected] = datasamp...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
select certain matrix elements
You can simply concatenate your ranges using square brackets: A([1:10 20:30],1)

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
If statement with or condition
if any(settimana < bdr) ... else ... end

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Setting min value of variables within a function
Maybe I don't understand correctly: if you want to set all negative entries of fval to 0 you can add fval(fval < 0) = 0; at th...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How do I make a 21x21 array from the center of a 200x150 array?
% dimensions n = 21; % rows m = 21; % cols % load image A = imread('grayscale.png'); % find center coordinate iCen...

plus de 6 ans il y a | 0

Réponse apportée
Create a matrix on the basis of other matrix
% your data SPI = [2 3 4 8 11 13 14 15 16 18 19 20]; AA = [1 2 3 4 0 11 14 15; 0 0 0 8 13 16 0 0; 0 0 0 0 ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How to i produce a signal which is a combination of three sinusoidal signal oscillate a frequency?
% frequencies f = [10 100 200]; % random amplitudes V = rand(3,1); % random phase phi = 2*pi*rand(3,1); % time axis ...

plus de 6 ans il y a | 0

Réponse apportée
Create an array from others matrix
You can just append the matrices as they come. a=100; b=5; N=8; % inital empty matrix PM = []; % your loop for sec=1:a ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Problem with while loop
% make matrices of the same length n1 = size(S1,1); n2 = size(S2,1); S1 = S1(min([n1,n2]),:); S2 = S2(min([n1,n2]),:); % ...

plus de 6 ans il y a | 0

Réponse apportée
Create a matrix on the basis of other matrix
Under the assumption that the "diversity" contains the same number of entries each row for i = 1:size(M,2) b(:,i) = unique...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
problem with fzero in my code
your fun is neither acceppting nor using inputs You should write the symbolic function like this fun = @(x)cos(x); x0 = fzero...

plus de 6 ans il y a | 0

Réponse apportée
how can i slove this proplem "- The vector V is given by V=[2 8 7 3 1 0 8 9]. Write down a single instruction to produce a vector that contains 1 in the place of the odd numbers and -1 in the place of the even numbers."
A suggestion: you can easily find the reminder of the division by 2, so that even numers have reminder 0 and odd numbers reminde...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Operands to the || and && operators must be convertible to logical scalar values.
If you work with arrays, use the single & and not &&

plus de 6 ans il y a | 0

Réponse apportée
How to use fzero in a loop to obtain the first 3 positve solutions for cos3x=sin3x?
fzero gives you only one solution. In case of multiple roots, the choice depends on the initial choice and on the algorithm. If ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
how to write a code to extract a positive latitude value for the corresponding positive longitudinal cell value
% filter idx = longitudinal >= 50 & longitudinal <= 100 & latitude >= 0 & latitude <= 40; % selection longitudinal2 = longi...

plus de 6 ans il y a | 0

Réponse apportée
Making a vector out of all even and odd numbers using for, if
This happens because the original vector contains random numbers that change every time you run the code. So, also the number of...

plus de 6 ans il y a | 0

Réponse apportée
Error using plot Vectors must be the same length.
Some comments 1) Q is defined twice as symbolic variable, but it is actually an array 2) in the first loop N = 4, so length(t)...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Optimisation of function containing matrix
While waiting for the data, I try to solve one of the questions. you can set the missing constraint as x1-x2 = 0 x2-x3 = 0 .....

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How to plot points on a line
I suggest you to check hold on, and the LineSpec of the command plot % your data new = rand(5,1); % open figure and retain ...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
How to break an image into blocks?
Three assumprions 1) the image is a 2d matrix 2) the row/cols have 64x3, 3x64 and 3x3 blocks 3) you want 10 sub images, not 1...

plus de 6 ans il y a | 1

Réponse apportée
Optimization problem using external program
I can figure out two solutions 1) check if the simulation program has API for running it from "outside". In this case, make ref...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Intersections between 2 graphs
Try this software on fex https://it.mathworks.com/matlabcentral/fileexchange/11837-fast-and-robust-curve-intersections

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Adjusting the resolution of the time vector
Try pdeval and supply the solution of pdepe

plus de 6 ans il y a | 0

Réponse apportée
Why my integration is like this?
You are calulating an indefinte integral that has an integration constant by definition. Matlab int command doesn't add the inte...

plus de 6 ans il y a | 0

Réponse apportée
Calculate the angle between plane normal and a point it cuts
using the definition of dot product: % angle function in radians ang = @(u,v)acos(dot(u,v)/(norm(u)*norm(v))); % data u = ...

plus de 6 ans il y a | 0

Réponse apportée
How to obtain the original matrix after performing symrcm or symamd in MATLAB?
Can you share the symV original matrix?

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Create an array from other array
x = [-V(:) -M(:)]; The column operator here reshapes the vector into a column vector

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Cumalative sum of each row of the matrix and the matrix array, separately
For the matrix Msum = cumsum(M,2) For the cell array Gsum = cellfun(@cumsum,G,'UniformOutput',false)

plus de 6 ans il y a | 2

| A accepté

Charger plus