Réponse apportée
How to erode parts of an image
If you just have one image, doing a matlab code to find the borders would be an overkill, so it would be better to just check th...

plus de 6 ans il y a | 1

Réponse apportée
Repeat specific elements in vector with keeping the basic vector
repelem indeed solves your problem, you just have to give the repetition indexes as a element-wise argument and pass the whole v...

plus de 6 ans il y a | 0

Réponse apportée
Shortest path through node group sets
If you have negative weightings an Algorithm that would work to find the shortest path is the Bellman-Ford. You can find some in...

plus de 6 ans il y a | 0

Réponse apportée
Another "unable to perform assignment because the indices on the left side are not compatible with the size of the right side" thread.
The problem is only about the indexing. When you do something like sV(k, c), you're actually getting a matrix with all possible ...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Audio Recording on Matlab Issue
Your code is fine, those square signals are just because the low amount of bits in the default audiorecorder which is very low (...

plus de 6 ans il y a | 0

Réponse apportée
Create a matrix that stores rows that are not from a random sample
The function ismember may be what you need to efficiently solve your problem: OriginalMatrix = randn(1020,9); RandomMatrixInde...

plus de 6 ans il y a | 0

Réponse apportée
List of paths between two points
It is not so clear by your list what underlying process you have, but I may assume you have a map (graph) where each point is a ...

plus de 6 ans il y a | 0

Réponse apportée
Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.
You don't need to declare numerical values with syms your variable sum is the same as the function sum for matlab, this can cau...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Selecting specific region around the known indices of a matrix.
You can dilate the image with a disk kernel and then take the difference to get the indexes: A = load('matlab.mat'); h = fsp...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Can i find 'mean' of on column , based on second column ?
You can first find the index where columm 6 is one, save it in a vector and then use it as a mask for your first columm, in this...

plus de 6 ans il y a | 0

Réponse apportée
Error. I want to plot this ode45 pressure versus time
There were some errors in your code: For ode45 you give numerical functions, not symbolic ones There were some variables that ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How to find the maximum value for each 2 rows in an array?
If I understood right you want the maximum element-wise matrix entry between the two matrices that appear in your 3rd dimension ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Find the boundary of any edge in an image .
Your input is just the image, so I can't check the solution in your exact data, but this should either way solve your problem or...

plus de 6 ans il y a | 0

Réponse apportée
How to calculate correlation coefficients for each corresponding pixel of two images(of same dimensions)? I need the output also to be of same dimension.
I believe they used a slided window cross correlation, which is basically the same as if you use corr2 (which will give you just...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Adding a piecewise time dependent term in system of differential equation
The conditional statement idea is right, the problem was that you considered that the ode45 would evaluate your function only at...

plus de 6 ans il y a | 3

| A accepté

Réponse apportée
Using a For Loop to calculate the pi for a taylor series
You can do it in a way to test multiple n's at giving input, as for example "[10,100,1000]" as input: clear;clc; format Long ...

plus de 6 ans il y a | 1

Réponse apportée
Use reshape to image with 3 dims
A = randn(6000,28,28); newA = reshape(A,[28 28 6000]); size(newA) imshow(newA(:,:,1)) size(newA) ans = 28 ...

plus de 6 ans il y a | 0

Réponse apportée
Hazy image equation implementation.
Can it be possible that you are just making a wrong conversion of your image data? With the code below I show an example of what...

plus de 6 ans il y a | 0

Réponse apportée
To generate following sequence
You can plot it actually pretty easily, just make sure to use your own u vector below : n = 4:100; u = ones(1,97); y = 5 .*...

plus de 6 ans il y a | 0

Réponse apportée
i have removed frequency from (3-200)HZ from FFT signal.Now i want to remove noise from last figure which is in time domain so that i can transmit signal.Thanks in advance.
For your signal a median filter may work fine enough. clc,close all,clear all codn=70; % fc=6e+3; fs=3600; bode=10; cod...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How to apply a bound constraint on a complex power vector
Saying that a complex number is bigger than the other is not so simple, you're comparing the magnitue? The real part? The imagin...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Remove strings from an array based on string length
For you to do the comparison you must first convert the string to a numeric. The following code should solve your problem: clc;...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Conditional values and equations
What you want to do is a non-linear optimization of the three parameters alpha, gm and gs. For you to do this you have to define...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Plotting amplitude and phase spectrum
This amplitude and phase spectrum plot of a transfer function is called the Bode plot , it is very well known and you may easily...

plus de 6 ans il y a | 1

Réponse apportée
Integrate y=x*sin(a*x^4).*exp(x^2./2)
Matlab can't find the close integral form for all functions (some may even not have one). If you are interested only in the valu...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Polyfit not showing a curve
polyfit only get you the coefficients, you then have to actually evaluate some values to get the curve. An easy alternative is t...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Determine daily derivative of time series data
For you to calculate the daily derivative you have to define a daily measurement for your variables. Normally the average is a ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Legend with text and values of array
You can pass an cell array of strings to the legend() (here for documentation https://de.mathworks.com/help/matlab/ref/legend.ht...

plus de 6 ans il y a | 3

| A accepté

Réponse apportée
get parameters of gaussian distributions from ksdensity function
The ksdensity uses a nonparametric representation to calculate the probabilities, so there's no parameters to get from the funct...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Looping random number arrays over a x,y meshgrid
I'm not sure how the equation is supposed to be defined but the main problem here is that you're multiplying arrays of different...

plus de 6 ans il y a | 0

Charger plus