Answered

why I getting error " Undefined function or variable"

You have a syntax error in your file that is making it unrunnable. As the very first character is flagged the first thing I w...

why I getting error " Undefined function or variable"

You have a syntax error in your file that is making it unrunnable. As the very first character is flagged the first thing I w...

2 days ago | 0

Answered

LaTeX in Live Scripts - Using \matrix

I have not checked Live Script, but MATLAB graphics support \begin{array} https://www.mathworks.com/matlabcentral/answers/2...

LaTeX in Live Scripts - Using \matrix

I have not checked Live Script, but MATLAB graphics support \begin{array} https://www.mathworks.com/matlabcentral/answers/2...

2 days ago | 0

Answered

integral2 error message Error using integral2 (line 71) XMIN must be a floating point scalar.

When you use integral2(), the first two time bounds must be scalar floating point constants. The second two time bounds can be e...

integral2 error message Error using integral2 (line 71) XMIN must be a floating point scalar.

When you use integral2(), the first two time bounds must be scalar floating point constants. The second two time bounds can be e...

2 days ago | 1

| accepted

Answered

Fast code to open and write separate 366 .bin files for each (row,col)

That code fopen()'s 366 files inside the loop, which can consume all of the file handles. Better would be for day =...

Fast code to open and write separate 366 .bin files for each (row,col)

That code fopen()'s 366 files inside the loop, which can consume all of the file handles. Better would be for day =...

2 days ago | 2

| accepted

Answered

Print first few lines of output

summary(T(:,1)) If summary() was just being used as an example, then temp = regexp(evalc("Put The Command Here"), '\n', 'split...

Print first few lines of output

summary(T(:,1)) If summary() was just being used as an example, then temp = regexp(evalc("Put The Command Here"), '\n', 'split...

2 days ago | 0

| accepted

Answered

How to for loop that callsout a cell of a matrix, put it another matrix, roots that matrix, and repeat until all of the cells are called out

A = -1000:100:1000; for i=1:length(A) B{i}=[1 3 A(i)+60]; %like 1*x^2 + 3*x + A+60 C{i}=roots(B{i}); %solves for the ...

How to for loop that callsout a cell of a matrix, put it another matrix, roots that matrix, and repeat until all of the cells are called out

A = -1000:100:1000; for i=1:length(A) B{i}=[1 3 A(i)+60]; %like 1*x^2 + 3*x + A+60 C{i}=roots(B{i}); %solves for the ...

3 days ago | 0

| accepted

Answered

How to detect small white pixels in an image and change their colour

Are there other white pixels that need to be retained? If there are, can they be distinguished by size? Or is it necessary to lo...

How to detect small white pixels in an image and change their colour

Are there other white pixels that need to be retained? If there are, can they be distinguished by size? Or is it necessary to lo...

3 days ago | 0

Answered

When matlab is performing parallel calculations, how to load a piece of data into the memory in the main program, so that the parallel subroutine only reads and does not modify this data.

https://www.mathworks.com/help/parallel-computing/parallel.pool.constant.html parpool constant

When matlab is performing parallel calculations, how to load a piece of data into the memory in the main program, so that the parallel subroutine only reads and does not modify this data.

https://www.mathworks.com/help/parallel-computing/parallel.pool.constant.html parpool constant

3 days ago | 0

Answered

assign op values from matrix

Sure. x = randi([0 1], 1, 50); disp(char('0'+x)) locs = find(x) for i = locs(13) : locs(17)-1 fprintf('x(%d) = %d\n', i...

assign op values from matrix

Sure. x = randi([0 1], 1, 50); disp(char('0'+x)) locs = find(x) for i = locs(13) : locs(17)-1 fprintf('x(%d) = %d\n', i...

3 days ago | 0

| accepted

Answered

I have a problem that when I use the Heaviside function in the For loop with ODE23 or ODE45, the code does not give exact results (always give 0)

The ode*() functions are all designed using mathematical theory that requires that the functions being used and their first two ...

I have a problem that when I use the Heaviside function in the For loop with ODE23 or ODE45, the code does not give exact results (always give 0)

The ode*() functions are all designed using mathematical theory that requires that the functions being used and their first two ...

3 days ago | 0

| accepted

Answered

How to calculate the volume enclosed by a set of XYZ points in 3D?

https://www.mathworks.com/support/matlabcentral/answers/489219-alternatives-to-delaunay-triangulation

How to calculate the volume enclosed by a set of XYZ points in 3D?

https://www.mathworks.com/support/matlabcentral/answers/489219-alternatives-to-delaunay-triangulation

3 days ago | 0

Answered

[NUMBER,STRING,EVERY]=xlsread("C:\Users\lenovo\Desktop\Sep_2020_Ericsson.xls")

The { [ are display artifacts. For example you can disp(EVERY{1,1}) and you will observe that those and the ' character...

[NUMBER,STRING,EVERY]=xlsread("C:\Users\lenovo\Desktop\Sep_2020_Ericsson.xls")

The { [ are display artifacts. For example you can disp(EVERY{1,1}) and you will observe that those and the ' character...

3 days ago | 0

Answered

Fast Fourier Transform Zero Padding

Pad_factor = 5; O2_exp = [0.0247 0.2372 1.9171 1.5570 0.8016 0.5572 1.2185 1.3601 1.006...

Fast Fourier Transform Zero Padding

Pad_factor = 5; O2_exp = [0.0247 0.2372 1.9171 1.5570 0.8016 0.5572 1.2185 1.3601 1.006...

3 days ago | 0

Answered

yyaxis left with Invalid text character error

[Copying down] /Users/yp1017/Downloads/ExpData/Juice_Choice/Code/ToolBoxes/ndt.1.0.4/octave_code/union.m You need to get that ...

yyaxis left with Invalid text character error

[Copying down] /Users/yp1017/Downloads/ExpData/Juice_Choice/Code/ToolBoxes/ndt.1.0.4/octave_code/union.m You need to get that ...

3 days ago | 0

Answered

how to determine image size png

IF you can trust the headers XResolution: 2835 YResolution: 2835 ResolutionUnit: 'm...

how to determine image size png

IF you can trust the headers XResolution: 2835 YResolution: 2835 ResolutionUnit: 'm...

3 days ago | 0

Answered

How to prevent array form combining

A1 = [1 2 3]; A2 = [4 5 6]; A3 = [7 8 9]; A = {A1, A2, A3} A{1} Notice the use of {} for indexing to get to the...

How to prevent array form combining

A1 = [1 2 3]; A2 = [4 5 6]; A3 = [7 8 9]; A = {A1, A2, A3} A{1} Notice the use of {} for indexing to get to the...

3 days ago | 0

Answered

Code generation requires variable 'ac' to be fully defined before subscripting it. Code generation requires variable 'an' to be fully defined before subscripting it. Code generation requires variable 'A11' to be fully defined before subscripting it.

Near the top of the code, you need to add ac = zeros(4,1); an = zeros(4,1); A1 = zeros(size(L));

Code generation requires variable 'ac' to be fully defined before subscripting it. Code generation requires variable 'an' to be fully defined before subscripting it. Code generation requires variable 'A11' to be fully defined before subscripting it.

Near the top of the code, you need to add ac = zeros(4,1); an = zeros(4,1); A1 = zeros(size(L));

3 days ago | 0

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

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

3 days ago | 0

| accepted

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.

3 days 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)

3 days ago | 0

| accepted

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

3 days ago | 0

| accepted

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 days ago | 0

| accepted

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

4 days ago | 1

| accepted

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

4 days ago | 1

| accepted

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

4 days ago | 1

| accepted

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

4 days ago | 0