Solved

Add a row of zeros on top of a matrix

Given a matrix, insert a row of zeros as the top row.

7 månader ago

Solved

Remove white space from the string

Remove the white spaces (trailing and leading) from the input variable

7 månader ago

Solved

Is it an Armstrong number?

An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. Fo...

7 månader ago

Solved

Given area find sides

In a right angle triangle given area 'A' one arm=x, another arm=2x then find the value of x. For example, area A=400 then ...

7 månader ago

Solved

Replicate elements in vectors

Replicate each element of a row vector (with NaN) a constant number of times. Examples n=2, A=[1 2 3] -> [1 1 2 2 3 3] ...

7 månader ago

Solved

02 - Vector Variables 5

_eVec_ = _Hello_ ( _eVec_ is a string, which is a vector of characters )

7 månader ago

Solved

Determine whether a vector is monotonically increasing

Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

7 månader ago

Answered

How to access folders within a loop

Try this (in absence of the Airport.xlsx files I can't completely test it here) - edit the obsdir back to your folder name where...

How to access folders within a loop

Try this (in absence of the Airport.xlsx files I can't completely test it here) - edit the obsdir back to your folder name where...

7 månader ago | 0

Answered

I have a problem with plotting a summation equation, Help me!

Hi. Editing - I had a (3-i) instead of (3+i) in the denominator - it's fixed now: k = 6; f = @(x)sum(sqrt((2*k-3)./((3 + [0:...

I have a problem with plotting a summation equation, Help me!

Hi. Editing - I had a (3-i) instead of (3+i) in the denominator - it's fixed now: k = 6; f = @(x)sum(sqrt((2*k-3)./((3 + [0:...

7 månader ago | 1

| accepted

Answered

How can i put this below lines of code in a for loop?

Here's how to do it for png, because that is all I have. Change extension to tif. % Edit this to be your toplevel directory m...

How can i put this below lines of code in a for loop?

Here's how to do it for png, because that is all I have. Change extension to tif. % Edit this to be your toplevel directory m...

7 månader ago | 1

| accepted

Answered

How can I store data from an if loop into a 1D vector

This function returns the indices where the peaks for ECG values in time-segments defined by a user-specified threshold functi...

How can I store data from an if loop into a 1D vector

This function returns the indices where the peaks for ECG values in time-segments defined by a user-specified threshold functi...

7 månader ago | 0

Answered

Using Read Table with a predefined Table size

Processing difficult text files - here the text file is space delimited with one or more spaces, but has a variable number of co...

Using Read Table with a predefined Table size

Processing difficult text files - here the text file is space delimited with one or more spaces, but has a variable number of co...

7 månader ago | 0

| accepted

Answered

Hi, check this question

Two Charges % Two 1 nC point positive charges are located at (-1, 0, 0) m and (1, 0, 0) m respectively. % Write a MATLAB scri...

Hi, check this question

Two Charges % Two 1 nC point positive charges are located at (-1, 0, 0) m and (1, 0, 0) m respectively. % Write a MATLAB scri...

7 månader ago | 0

Answered

How can I display multiple Images and plot the centroid ?

I played with the first part to make some more plot options (I had to do the poor man's distances because I can't afford the sta...

How can I display multiple Images and plot the centroid ?

I played with the first part to make some more plot options (I had to do the poor man's distances because I can't afford the sta...

7 månader ago | 0

Answered

How to subset a table in a function based on input arguments

Can just use an anonymous function: clc close all clear all getVarsetTable = @(t,userPrefix) t(:,contains(t.Properties.Var...

How to subset a table in a function based on input arguments

Can just use an anonymous function: clc close all clear all getVarsetTable = @(t,userPrefix) t(:,contains(t.Properties.Var...

7 månader ago | 0

| accepted

Answered

How to change the way it is being plotted?

Possible solution (journal paper values just eyeballed not digitized) JSRdB=40:5:60; MSESilva = [0.9592 1.1141 1.6038 ...

How to change the way it is being plotted?

Possible solution (journal paper values just eyeballed not digitized) JSRdB=40:5:60; MSESilva = [0.9592 1.1141 1.6038 ...

7 månader ago | 1

| accepted

Answered

Find cell position of a timeseries array

Assuming your data are in vector arrays that are, say, doubles, and packed as not cell arrays: test.Time = 0:0.1:50; test.Time...

Find cell position of a timeseries array

Assuming your data are in vector arrays that are, say, doubles, and packed as not cell arrays: test.Time = 0:0.1:50; test.Time...

7 månader ago | 1

| accepted

Answered

I NEED TO SHOW THE COLUMN STACKED DATA OF MY LANDSET IMAGE

This unpacks the capture, but i'm not sure what you want next: [img,cmap] = imread('Capture.png'); imshow(img) imgData1 = s...

I NEED TO SHOW THE COLUMN STACKED DATA OF MY LANDSET IMAGE

This unpacks the capture, but i'm not sure what you want next: [img,cmap] = imread('Capture.png'); imshow(img) imgData1 = s...

7 månader ago | 1

| accepted

Answered

Construct a vector from another, but add 2 values every 10 iteration

Try this: npts = 811; A = linspace(0,1,npts); numAdded = sum(mod(1:npts,10) == 0); B = zeros(1,numAdded+npts); k = 0; for ...

Construct a vector from another, but add 2 values every 10 iteration

Try this: npts = 811; A = linspace(0,1,npts); numAdded = sum(mod(1:npts,10) == 0); B = zeros(1,numAdded+npts); k = 0; for ...

7 månader ago | 0

| accepted

Answered

creating a 1D vector

Here's one of many possible solutions (edited 2020/01/11 for off-by-one error in indexing): clc close all clear all ECG = ...

creating a 1D vector

Here's one of many possible solutions (edited 2020/01/11 for off-by-one error in indexing): clc close all clear all ECG = ...

7 månader ago | 0

Answered

creating a 1D vector

Here's a solution that has a step by step process. clc close all clear all %% Step 0 % load the data ECG = dlmread('ECG...

creating a 1D vector

Here's a solution that has a step by step process. clc close all clear all %% Step 0 % load the data ECG = dlmread('ECG...

7 månader ago | 0

Answered

Minimizing a function with one variable

Is this what you're looking for? p = pi; w = 9*pi/56; c = 5; rmin = -40; rmax = 40; % inline function fun = @(x)(0.5*p*...

Minimizing a function with one variable

Is this what you're looking for? p = pi; w = 9*pi/56; c = 5; rmin = -40; rmax = 40; % inline function fun = @(x)(0.5*p*...

7 månader ago | 0

| accepted

Answered

How to tell if a random 3x3 Matrix is invertible

Back to your question, I have to produce a random 3x3 matrix A that is invertible and display it. One way could be to start with...

How to tell if a random 3x3 Matrix is invertible

Back to your question, I have to produce a random 3x3 matrix A that is invertible and display it. One way could be to start with...

7 månader ago | 0

| accepted

Answered

maximum of the radiation pattern in a direction

Solution, I hope! % for a general (theta0,phi0) express the surface in spherical coordinates % [Azimuth,Elevation,R] = cart2sp...

maximum of the radiation pattern in a direction

Solution, I hope! % for a general (theta0,phi0) express the surface in spherical coordinates % [Azimuth,Elevation,R] = cart2sp...

7 månader ago | 0

| accepted

Answered

How can I plot the frequency content of my sample?

Did you find a solution yet? Here's one. I wasn't sure if you wanted the frequencies identified or just plotted. clear all %C...

How can I plot the frequency content of my sample?

Did you find a solution yet? Here's one. I wasn't sure if you wanted the frequencies identified or just plotted. clear all %C...

7 månader ago | 1

Answered

drawing a fast Fourier transform

Here's a solution X = dlmread('ECG.csv'); Fs = 350*60; % [samples/min] sampling frequency T = 1/Fs; % [s] sampli...

drawing a fast Fourier transform

Here's a solution X = dlmread('ECG.csv'); Fs = 350*60; % [samples/min] sampling frequency T = 1/Fs; % [s] sampli...

7 månader ago | 0

| accepted

Answered

Please, help solve the dynamics equation in matlab simulink

There is a solution here on the web: https://www.matlab-monkey.com/ODE/resonance/resonance.html Just set the value of 'A' to 0...

Please, help solve the dynamics equation in matlab simulink

There is a solution here on the web: https://www.matlab-monkey.com/ODE/resonance/resonance.html Just set the value of 'A' to 0...

7 månader ago | 0

| accepted

Answered

finding elements in array

To get the indices to the vk array vk = [0 0.025 0.05 0.075 0.1 0.125 0.15 0.175]; [idx] = find(vk>= 0.05 & vk<= 0.175)...

finding elements in array

To get the indices to the vk array vk = [0 0.025 0.05 0.075 0.1 0.125 0.15 0.175]; [idx] = find(vk>= 0.05 & vk<= 0.175)...

7 månader ago | 0

| accepted

Answered

How can I plot each local maxima of my ECG data

Remove the hold off in the outer loop and remove the replotting of the entire dataset in each sement processing step - change...

How can I plot each local maxima of my ECG data

Remove the hold off in the outer loop and remove the replotting of the entire dataset in each sement processing step - change...

7 månader ago | 0

| accepted

Answered

Do anyone code this paper http://link.springer.com/chapter/10.1007/978-3-642-23223-7_13 "A Research on Improved Canny Edge Detection Algorithm " by Jun Li, Sheng Ding

matlab wrapper here: https://github.com/KshanaRules/BajaMap/blob/master/edgedetect.m

Do anyone code this paper http://link.springer.com/chapter/10.1007/978-3-642-23223-7_13 "A Research on Improved Canny Edge Detection Algorithm " by Jun Li, Sheng Ding

matlab wrapper here: https://github.com/KshanaRules/BajaMap/blob/master/edgedetect.m

7 månader ago | 0