Answered

How to find all elements in a matrix less than a certain number?

Hint: use logical indexing https://www.mathworks.com/company/newsletters/articles/matrix-indexing-in-matlab.html

How to find all elements in a matrix less than a certain number?

Hint: use logical indexing https://www.mathworks.com/company/newsletters/articles/matrix-indexing-in-matlab.html

1 hour ago | 0

Answered

Interpolate a 1024x116 Matrix to a 1024x1024 Matrix

Assuming the curves are independent of each other, use interp1() x = 1:116; c1 = randn(1,116); c2 = rand(1,116)*5; y = linsp...

Interpolate a 1024x116 Matrix to a 1024x1024 Matrix

Assuming the curves are independent of each other, use interp1() x = 1:116; c1 = randn(1,116); c2 = rand(1,116)*5; y = linsp...

1 hour ago | 0

Answered

psdata files in matlab

https://www.picotech.com/support/topic28541.html PicoTech says that the file format is propietary and will not be released.

psdata files in matlab

https://www.picotech.com/support/topic28541.html PicoTech says that the file format is propietary and will not be released.

2 hours ago | 0

| accepted

Answered

Write a for loop that goes through each row of Matrix

for i = 1:size(Z,1) and refer to Z(i,1) and Z(i,2)

Write a for loop that goes through each row of Matrix

for i = 1:size(Z,1) and refer to Z(i,1) and Z(i,2)

2 hours ago | 0

Answered

using fwrite for multiple data type at once

memmapfile() can be used to read and write fixed-length records https://www.mathworks.com/help/matlab/ref/memmapfile.html Alte...

using fwrite for multiple data type at once

memmapfile() can be used to read and write fixed-length records https://www.mathworks.com/help/matlab/ref/memmapfile.html Alte...

2 hours ago | 0

Answered

Use text in table to make variables

That is not recommended. For example, how would you expect your code to be able to proceed if one of the symbols was 'T' and so ...

Use text in table to make variables

That is not recommended. For example, how would you expect your code to be able to proceed if one of the symbols was 'T' and so ...

3 hours ago | 0

Answered

Replacing empty cells using for loop

ses1_results = {1.192;0;0;0;0.5678;0;0;0;0;0;0;1;[];1} mask = cellfun(@(C) numel(C) == 1 && C == 0, ses1_results); rest = ses1...

Replacing empty cells using for loop

ses1_results = {1.192;0;0;0;0.5678;0;0;0;0;0;0;1;[];1} mask = cellfun(@(C) numel(C) == 1 && C == 0, ses1_results); rest = ses1...

3 hours ago | 0

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 ...

3 hours ago | 1

| accepted

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)+...

14 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...

15 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...

15 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...

16 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...

16 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...

16 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 ...

16 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...

17 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

20 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...

20 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()

21 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...

21 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...

2 days 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