Answered

Signal Decomposition for a mixed signal

t=0:0.00001:0.3; x1=(exp(-3*t)).*(0.2*sin(2*pi*400*t)); x2=1.2+(exp(-1.5*t)).*(1.1*sin(2*pi*40*t+pi/6)); x3=(exp(-5*t)).*(0.8...

Signal Decomposition for a mixed signal

t=0:0.00001:0.3; x1=(exp(-3*t)).*(0.2*sin(2*pi*400*t)); x2=1.2+(exp(-1.5*t)).*(1.1*sin(2*pi*40*t+pi/6)); x3=(exp(-5*t)).*(0.8...

bijna 5 jaar ago | 0

| accepted

Answered

Hi I am having a hard time using the getfield. It says there is an error.

lat = getfield(latStruct,latField{1});

Hi I am having a hard time using the getfield. It says there is an error.

lat = getfield(latStruct,latField{1});

bijna 5 jaar ago | 0

Answered

Index exceeds matrix dimensions

I tried this, it worked fine. No error: date_start = "2015-01-01"; date_end = "2019-10-01"; char_date_start= char(date_start)...

Index exceeds matrix dimensions

I tried this, it worked fine. No error: date_start = "2015-01-01"; date_end = "2019-10-01"; char_date_start= char(date_start)...

bijna 5 jaar ago | 0

Answered

how can I creat a matrix of all possible combinations of zero and ones across eight digits.

decimalVector= [0:1:(2^8)-1]'; binaryMatrix = de2bi(decimalVector);

how can I creat a matrix of all possible combinations of zero and ones across eight digits.

decimalVector= [0:1:(2^8)-1]'; binaryMatrix = de2bi(decimalVector);

bijna 5 jaar ago | 2

Answered

Exporting model to classify new data

1.Save: (assuming you want to save/export each classifier in separate files) use save(). 2. ROC curve: use perfcurve() and plot...

Exporting model to classify new data

1.Save: (assuming you want to save/export each classifier in separate files) use save(). 2. ROC curve: use perfcurve() and plot...

bijna 5 jaar ago | 1

| accepted

Answered

IFFT of Convolution equivalence

Sorry for the confusion. Here is what I tried: a1 = randi(50,8,1); b1 = randi(50,8,1); x = complex(a1,b1) a2 = randi(50,8,1)...

IFFT of Convolution equivalence

Sorry for the confusion. Here is what I tried: a1 = randi(50,8,1); b1 = randi(50,8,1); x = complex(a1,b1) a2 = randi(50,8,1)...

bijna 5 jaar ago | 1

| accepted

Answered

Turning a matrix into a vector issue where it truncates (easy question)

finalMessage = reshape(messageSymbolsDemod,[],1); % from matrix to vector finalMessage = padarray(finalMessage,16-length(finalM...

Turning a matrix into a vector issue where it truncates (easy question)

finalMessage = reshape(messageSymbolsDemod,[],1); % from matrix to vector finalMessage = padarray(finalMessage,16-length(finalM...

bijna 5 jaar ago | 0

| accepted

Answered

sub2ind gives error: Error using sub2ind (line 43) Out of range subscript.

In your code, xs contains negative values, which can't be the column indices. Also, sc is only 1004x1144. But the values of xs ...

sub2ind gives error: Error using sub2ind (line 43) Out of range subscript.

In your code, xs contains negative values, which can't be the column indices. Also, sc is only 1004x1144. But the values of xs ...

bijna 5 jaar ago | 0

| accepted

Answered

()-indexing must appear last in an index expression.

for i=1:1:w for j=2:1:h if (min(Idark(i,j))>= A(i,j-1)) A(i,j)=min(Idark(i,j)); else ...

()-indexing must appear last in an index expression.

for i=1:1:w for j=2:1:h if (min(Idark(i,j))>= A(i,j-1)) A(i,j)=min(Idark(i,j)); else ...

bijna 5 jaar ago | 0

| accepted

Answered

For loop for a comparing values of a column vector with a value

costs=[Fail]'; costs = repelem(costs,1,length(PM_cyc)); output = zeros(size(costs)); for i = 1:length(PM_cyc) output(fin...

For loop for a comparing values of a column vector with a value

costs=[Fail]'; costs = repelem(costs,1,length(PM_cyc)); output = zeros(size(costs)); for i = 1:length(PM_cyc) output(fin...

bijna 5 jaar ago | 1

| accepted

Answered

Average histogram of R,G,B histograms

I=imread('Capture.PNG'); [counts1,edges1]=histcounts(I(:,:,1),linspace(0,1,256)); [counts2,edges2]=histcounts(I(:,:,2),linsp...

Average histogram of R,G,B histograms

I=imread('Capture.PNG'); [counts1,edges1]=histcounts(I(:,:,1),linspace(0,1,256)); [counts2,edges2]=histcounts(I(:,:,2),linsp...

bijna 5 jaar ago | 0

| accepted

Answered

How can I import dataset in specific range

i=input('Enter a start row: '); j=input('Enter a end row: '); k=input('Enter a start column: '); t=input('Enter a end column:...

How can I import dataset in specific range

i=input('Enter a start row: '); j=input('Enter a end row: '); k=input('Enter a start column: '); t=input('Enter a end column:...

bijna 5 jaar ago | 0

| accepted

Answered

matching numbers between variables

GroupZERO(ismember(GroupZERO,outliers))=[]

matching numbers between variables

GroupZERO(ismember(GroupZERO,outliers))=[]

bijna 5 jaar ago | 0

| accepted

Answered

Logical index multiple columns

I believe you are trying to find the row-indices of A, where the row contains a 1, and then extract those rows from B. In that c...

Logical index multiple columns

I believe you are trying to find the row-indices of A, where the row contains a 1, and then extract those rows from B. In that c...

bijna 5 jaar ago | 0

| accepted

Answered

Empty Matrix with Dynamic Fertility Model

Looks like your indexing is off in some places: simchoice = zeros(1000,20) %Looping for 1000 women for i = 1:1000 ...

Empty Matrix with Dynamic Fertility Model

Looks like your indexing is off in some places: simchoice = zeros(1000,20) %Looping for 1000 women for i = 1:1000 ...

bijna 5 jaar ago | 0

Answered

How to plot histogram of difference of two images using MATLAB

histogram(image_of_dif) will plot the histogram showing the distribution of values (both positive and negative differences).

How to plot histogram of difference of two images using MATLAB

histogram(image_of_dif) will plot the histogram showing the distribution of values (both positive and negative differences).

bijna 5 jaar ago | 0

| accepted

Answered

How can I solve this error with MATLAB CODER?

In your example you can certainly preallocate the variable: Conv_out = zeros(1,2*length (Conv_In));

How can I solve this error with MATLAB CODER?

In your example you can certainly preallocate the variable: Conv_out = zeros(1,2*length (Conv_In));

bijna 5 jaar ago | 0

| accepted

Answered

Plotting an equation raised to a variable.

fun1 = a_n(1)*(t.^(n)) .^ is a pointwise (elementwise) operation, that means it operates on arrays of same length or one of the...

Plotting an equation raised to a variable.

fun1 = a_n(1)*(t.^(n)) .^ is a pointwise (elementwise) operation, that means it operates on arrays of same length or one of the...

bijna 5 jaar ago | 0

Answered

Normality test temperature data

Since linear shift won't affect the distribution, you can shift the data and perform log transformation. %% test data data =...

Normality test temperature data

Since linear shift won't affect the distribution, you can shift the data and perform log transformation. %% test data data =...

bijna 5 jaar ago | 0

Answered

how to reverse a string using a FOR loop

Update: myString = "abcdefg"; myChar = char(myString); % using array indexing myNewStr = string(myChar(end:-1:1)); % us...

how to reverse a string using a FOR loop

Update: myString = "abcdefg"; myChar = char(myString); % using array indexing myNewStr = string(myChar(end:-1:1)); % us...

bijna 5 jaar ago | 0

| accepted

Answered

How do I combine data tables where there are different row lengths?

T1(ismember(table2array(T1(:,1)),table2array(T2)),2) = T2; T1(ismember(table2array(T1(:,1)),table2array(T3)),3) = T3;

How do I combine data tables where there are different row lengths?

T1(ismember(table2array(T1(:,1)),table2array(T2)),2) = T2; T1(ismember(table2array(T1(:,1)),table2array(T3)),3) = T3;

bijna 5 jaar ago | 1

| accepted

Answered

SVM classifier on digits dataset

fitcsvm() is not designed to train directly on 28x28 images. You need to extract feature vectors for each image. After feature e...

SVM classifier on digits dataset

fitcsvm() is not designed to train directly on 28x28 images. You need to extract feature vectors for each image. After feature e...

bijna 5 jaar ago | 0

Answered

How do I the minimum points on a 3D surface diagram (x,y,z) as a function of the x and y variables?

I am assuming your x-axis is phi and y-axis is h: min_phi = min(E,[],1); min_h = min(E,[],2);

How do I the minimum points on a 3D surface diagram (x,y,z) as a function of the x and y variables?

I am assuming your x-axis is phi and y-axis is h: min_phi = min(E,[],1); min_h = min(E,[],2);

bijna 5 jaar ago | 1

| accepted

Answered

How can I get data from histogram ?

I believe you are looking for histcounts() instead of histogram(). [counts, centers] = histcounts(data,'BinWidth',0.005); prob...

How can I get data from histogram ?

I believe you are looking for histcounts() instead of histogram(). [counts, centers] = histcounts(data,'BinWidth',0.005); prob...

bijna 5 jaar ago | 1

| accepted

Answered

How do you plot multiple best fit lines to one graph?

On cftool, you can open new fits for the same data in new tabs. So ... no, not on the same figure. But .. you can save the fit...

How do you plot multiple best fit lines to one graph?

On cftool, you can open new fits for the same data in new tabs. So ... no, not on the same figure. But .. you can save the fit...

bijna 5 jaar ago | 0

Answered

Concatinate 4D Time-Signals

You want to concatenate on the dim which is not same for both, right? Catq1 = cat(1,I1,I2); % OR Catq1 = [I1;I2];

Concatinate 4D Time-Signals

You want to concatenate on the dim which is not same for both, right? Catq1 = cat(1,I1,I2); % OR Catq1 = [I1;I2];

bijna 5 jaar ago | 0

| accepted

Answered

How to get specific data from specified rows and variables in a table?

S = A - Table.Sensitivity(Table.Sensor_type=="COB4_St1")

How to get specific data from specified rows and variables in a table?

S = A - Table.Sensitivity(Table.Sensor_type=="COB4_St1")

bijna 5 jaar ago | 1

| accepted

Answered

Truncate a two dim array based on contents of a particular column

N = input('Number of rows: '); A = rand(N,34); A(:,12) = randi([0 3],N,1); % simple version if 12th col only always has 0,1,...

Truncate a two dim array based on contents of a particular column

N = input('Number of rows: '); A = rand(N,34); A(:,12) = randi([0 3],N,1); % simple version if 12th col only always has 0,1,...

bijna 5 jaar ago | 0