Answered

How do position coordinates work on a subplot?

insertText() and insertShape() work with array coordinates, and those are not necessarily the same as axes data coordinates. An ...

How do position coordinates work on a subplot?

insertText() and insertShape() work with array coordinates, and those are not necessarily the same as axes data coordinates. An ...

37 minutes ago | 0

Answered

How to plot a DE

You need specific boundary conditions in order to plot, and specific w_n value. syms x_d(t_d) syms w_n ode = diff(x_d,t_d,2)+...

How to plot a DE

You need specific boundary conditions in order to plot, and specific w_n value. syms x_d(t_d) syms w_n ode = diff(x_d,t_d,2)+...

12 hours ago | 0

Answered

Compare on plots variables from two .mat files with same variables

f1 = load('FirstName.mat'); f2 = load('SecondName.mat'); plot(f1.X, f1.Y, 'b', f2.X, f2.Y, 'k--'); legend({'first file', 'se...

Compare on plots variables from two .mat files with same variables

f1 = load('FirstName.mat'); f2 = load('SecondName.mat'); plot(f1.X, f1.Y, 'b', f2.X, f2.Y, 'k--'); legend({'first file', 'se...

12 hours ago | 1

Answered

How to import a lot of .blf data files?

dinfo = dir('2020*.blf'); filenames = {dinfo.name}; numfiles = length(filenames); contents = cell(numfiles,1); for K = 1 : n...

How to import a lot of .blf data files?

dinfo = dir('2020*.blf'); filenames = {dinfo.name}; numfiles = length(filenames); contents = cell(numfiles,1); for K = 1 : n...

12 hours ago | 0

Answered

Undefined function or variable 'I2Cdev'.

You are using arduino. The arduino interface does not use ic2dev . See https://www.mathworks.com/help/supportpkg/arduinoio/examp...

Undefined function or variable 'I2Cdev'.

You are using arduino. The arduino interface does not use ic2dev . See https://www.mathworks.com/help/supportpkg/arduinoio/examp...

13 hours ago | 0

Answered

xAxis of plot starts when no data is available

MATLAB is trying for "nice" tick marks. With the datetime values you are giving it, everything except December 31 2019 fits in n...

xAxis of plot starts when no data is available

MATLAB is trying for "nice" tick marks. With the datetime values you are giving it, everything except December 31 2019 fits in n...

13 hours ago | 0

| accepted

Answered

infinite series with loop in MATLAB

syms z I k real F = symsum((-z*I)^k/(k*factorial(k)), k, 1, inf) However, examine the behavior when k = 0, the lower bound fro...

infinite series with loop in MATLAB

syms z I k real F = symsum((-z*I)^k/(k*factorial(k)), k, 1, inf) However, examine the behavior when k = 0, the lower bound fro...

13 hours ago | 0

| accepted

Answered

Fsolve with Loop and to store variable

You are required to iterate through given x(4) values. So start solving the equations in terms of x(4) syms x1 x2 x3 x4 x5 x6 ...

Fsolve with Loop and to store variable

You are required to iterate through given x(4) values. So start solving the equations in terms of x(4) syms x1 x2 x3 x4 x5 x6 ...

14 hours ago | 0

| accepted

Answered

3D plot matlab from X Y Z data and integrating a slice function

If you have a regular grid of x y z points, then pull out the columns and reshape() and possibly permute() into an appropriate s...

3D plot matlab from X Y Z data and integrating a slice function

If you have a regular grid of x y z points, then pull out the columns and reshape() and possibly permute() into an appropriate s...

15 hours ago | 0

Answered

how can convert time domain to frequency domain

See fft and in particular the first example to see how to label the frequency bins

how can convert time domain to frequency domain

See fft and in particular the first example to see how to label the frequency bins

18 hours ago | 0

Answered

Concatenate string arrays of different sizes

It is an error in the code when f is a column vector. It would work if f were a row vector. However it seems more likely that yo...

Concatenate string arrays of different sizes

It is an error in the code when f is a column vector. It would work if f were a row vector. However it seems more likely that yo...

18 hours ago | 1

Answered

Why i am getting error in printing array?

print() is for sending graphics to the printer or to a file. You probably want disp()

Why i am getting error in printing array?

print() is for sending graphics to the printer or to a file. You probably want disp()

18 hours ago | 0

Answered

Please explain Matlab's naming convention for odepq

p is the order of the calculation used to predict the solution, and q is the order of the calculation used for the error estimat...

Please explain Matlab's naming convention for odepq

p is the order of the calculation used to predict the solution, and q is the order of the calculation used for the error estimat...

19 hours ago | 1

| accepted

Answered

Is it possible to get the boundary size of an object in an image same after rotation of the image by a particular angle?

Img =imread('square.bmp'); Imgg = rgb2gray(Img); angles = 0:-10:-90; nang = length(angles); fignums = [1, 1, 1, 1, 2, 3, 1...

Is it possible to get the boundary size of an object in an image same after rotation of the image by a particular angle?

Img =imread('square.bmp'); Imgg = rgb2gray(Img); angles = 0:-10:-90; nang = length(angles); fignums = [1, 1, 1, 1, 2, 3, 1...

1 day ago | 0

Answered

Creating noise in an image unconventionally

x = rand(size(Beam)) < 0.2; %logical array! z = Beam; n = rand(1,nnz(x)) * 250; z(x) = n;

Creating noise in an image unconventionally

x = rand(size(Beam)) < 0.2; %logical array! z = Beam; n = rand(1,nnz(x)) * 250; z(x) = n;

1 day ago | 0

| accepted

Answered

How to find out a smallest sub-matrix B from a sparse matrix A which has the equal rank and # of non-zero columns?

In general there is no solution. Every dense matrix is also a spare matrix. An NxN full-rank dense matrix might happen to hav...

How to find out a smallest sub-matrix B from a sparse matrix A which has the equal rank and # of non-zero columns?

In general there is no solution. Every dense matrix is also a spare matrix. An NxN full-rank dense matrix might happen to hav...

1 day ago | 0

Answered

How can I create an array to hold the unpicked values from a randsample function?

ridx = randperm(length(YourVector)); selected = YourVector(1:end/2); unselected = YourVector(end/2+1:end);

How can I create an array to hold the unpicked values from a randsample function?

ridx = randperm(length(YourVector)); selected = YourVector(1:end/2); unselected = YourVector(end/2+1:end);

1 day ago | 0

Answered

how to fix "unrecognized table variable name" error?

imds = imageDatastore('C:\Users\Muhammad Sanwal\Desktop\COMSATS\The 9th Semester (FA20)\FYP pt 1\MIO-TCD-Localization\train\0000...

how to fix "unrecognized table variable name" error?

imds = imageDatastore('C:\Users\Muhammad Sanwal\Desktop\COMSATS\The 9th Semester (FA20)\FYP pt 1\MIO-TCD-Localization\train\0000...

1 day ago | 0

Answered

How to sort out the dead nodes in a WSN and exclude them from the rest of the operations and calculations in the MATLAB code?

dists(i,:) = []; % Removing the row that contains the dead node in the distances array dists was created as a symm...

How to sort out the dead nodes in a WSN and exclude them from the rest of the operations and calculations in the MATLAB code?

dists(i,:) = []; % Removing the row that contains the dead node in the distances array dists was created as a symm...

1 day ago | 0

Answered

Error in ode45 (line 115)

ode45 can never be used for symbolic expressions. See dsolve() instead, or see the first example for odeFunction

Error in ode45 (line 115)

ode45 can never be used for symbolic expressions. See dsolve() instead, or see the first example for odeFunction

1 day ago | 0

Answered

Hi all! Could you please help me understand this piece of code here?

It initializes an i2c register on the arduino. It loops indefinitely. Each cycle it reads 14 bytes of data that are in big-Endia...

Hi all! Could you please help me understand this piece of code here?

It initializes an i2c register on the arduino. It loops indefinitely. Each cycle it reads 14 bytes of data that are in big-Endia...

1 day ago | 0

| accepted

Answered

what to do when i run the matlab coding it show "configuremulticast" is supported only on "windows in the command window

you are correct that new function is only available for windows. https://www.mathworks.com/help/instrument/udpport.configure...

what to do when i run the matlab coding it show "configuremulticast" is supported only on "windows in the command window

you are correct that new function is only available for windows. https://www.mathworks.com/help/instrument/udpport.configure...

2 days ago | 0

| accepted

Answered

Where do I get the dlnode.m function for creating linked lists?

https://www.mathworks.com/help/matlab/matlab_oop/example-implementing-linked-lists.html#brik0u3 Just below the "Example Code" ...

Where do I get the dlnode.m function for creating linked lists?

https://www.mathworks.com/help/matlab/matlab_oop/example-implementing-linked-lists.html#brik0u3 Just below the "Example Code" ...

2 days ago | 1

| accepted

Answered

All fixed points of function

syms x f(x) = cos(x) - 0.07 * x^2; fplot([f(x)-x,0], [-15 15]) Now you can vpasolve() giving a starting point near a...

All fixed points of function

syms x f(x) = cos(x) - 0.07 * x^2; fplot([f(x)-x,0], [-15 15]) Now you can vpasolve() giving a starting point near a...

2 days ago | 0

Answered

Disable function if called from livescript

mfilename fullpath will be in a temporary directory if you are using livescript, and the file name itself will start with "Live...

Disable function if called from livescript

mfilename fullpath will be in a temporary directory if you are using livescript, and the file name itself will start with "Live...

2 days ago | 0

| accepted

Answered

Unable to perform assignment because the left and right sides have a different number of elements.

dt = 0.01; i0 = 1; i(1) = i0; i = (1:dt:21); Note that overwrites all of i It is not recommended to use i as a variable nam...

Unable to perform assignment because the left and right sides have a different number of elements.

dt = 0.01; i0 = 1; i(1) = i0; i = (1:dt:21); Note that overwrites all of i It is not recommended to use i as a variable nam...

2 days ago | 0

Answered

Operands to the || and && operators must be convertible to logical scalar values.

grains{b}=sum(x_array{b}>ymin) && (x_array{b}<ymax) Your sum() ends too early. sum(condition & condition)

Operands to the || and && operators must be convertible to logical scalar values.

grains{b}=sum(x_array{b}>ymin) && (x_array{b}<ymax) Your sum() ends too early. sum(condition & condition)

3 days ago | 0

| accepted

Answered

Why Would fplot(f) and fplot(vpa(f)) Show Different Results?

fplot problems. Look at this: format long g syms y1 fu1 = str2sym("piecewise(y1 < 0, 0, 0 <= y1, -(25353012004564588029934064...

Why Would fplot(f) and fplot(vpa(f)) Show Different Results?

fplot problems. Look at this: format long g syms y1 fu1 = str2sym("piecewise(y1 < 0, 0, 0 <= y1, -(25353012004564588029934064...

3 days ago | 0

| accepted

Answered

COMPARE CELLS VIA A LOOP

%comparison filename1 = 'test.xlsx'; [d1,tex]= xlsread(filename1); NAME1=tex(:,1); k1 = cellfun(@(C) C(1), NAME1); ...

COMPARE CELLS VIA A LOOP

%comparison filename1 = 'test.xlsx'; [d1,tex]= xlsread(filename1); NAME1=tex(:,1); k1 = cellfun(@(C) C(1), NAME1); ...

3 days ago | 0

Answered

Getting Empty sym: 0-by-1 when using solve function.

There is no closed-form solution to that. You will not even get closed form solutions if you substitute in constants for all of...

Getting Empty sym: 0-by-1 when using solve function.

There is no closed-form solution to that. You will not even get closed form solutions if you substitute in constants for all of...

3 days ago | 0