Answered
Plot problem though there are data numbers
The reason the graph appears empty is because time=0:0.008 is a vector with only one element (0). What you need to do is specify...

5 years ago | 0

| accepted

Answered
how can I do a code that compares each document one by one and get all the information I want?
Based on a comment you made on a another related question (https://www.mathworks.com/matlabcentral/answers/1453769-ismember-and-...

5 years ago | 0

| accepted

Answered
Fractional steps in for loops
yHH = 1:0.1:3; for yH = 1:length(yHH) display(yH); end compare to: yHH = 1:0.1:3; for yH = 1:length(yHH) display(...

5 years ago | 0

| accepted

Answered
how do i sorting a list of files in a folder
Assuming the 'list' is actually a cell array of character vectors. To sort them in alphabetical order: fn = {'M_1.log' 'M_2.lo...

5 years ago | 0

Answered
i don't know what is the error?
The error is that your script error.m in /MATLAB Drive takes precedence over the built-in MATLAB function error.m. You should re...

5 years ago | 1

Answered
add value to cell array
It sounds like (I'm not 100% sure) what you want is that when label_text_output is the empty array, it does not get added to the...

5 years ago | 0

Answered
add a shape to the figures in one plot
The first call to subplot() deletes the rectangle and the axes it was in, so that's why you don't see it when you run your code....

5 years ago | 0

Answered
How to know the smallest number after 0
The smallest uint16 number after zero is one.

5 years ago | 0

| accepted

Answered
How to write this kind of function in Matlab?
function o0 = f(i0,i1)

5 years ago | 0

Answered
write a MATLAB code to search for the minimum element value in this array. Write the code to display the index
Here's a way to do it with a while loop. Based on this approach, maybe you can come up with a way that uses a for loop instead. ...

5 years ago | 0

Answered
How can I convert decimal number to binary number
a = 32; dec2bin(a,8) % use (at least) 8 bits

5 years ago | 0

| accepted

Answered
How to remove the for loop from the following code?
yy = cellfun(@(x,y)predict(x,y),myRF(Index,:),repmat(num2cell(xxtr,2),1,4));

5 years ago | 0

| accepted

Answered
Making matrix with letters
N = 50; A = char(65+floor(26*rand(N))) figure(); [X,Y] = meshgrid(1:N,1:N); text(X(:),Y(:),num2cell(A),'FontSize',6); set(g...

5 years ago | 0

Answered
How do you create an array from input statements?
A = []; while true new = input('Enter a number: '); if isempty(new) break end A(end+1) = new; end...

5 years ago | 0

Answered
Return first few values to zero in a row
A=[1 2 4 5 6 7 8 9 0 2 3 4 5 6] B1 = A; B1(1:9) = 0 B2 = A; B2(1:4) = 0

5 years ago | 0

| accepted

Answered
how i can select a part or section in the matrix
Like this? A = reshape(1:256,16,16).' % construct 16-by-16 matrix as in the file % Take the 8-by-8 matrix that is the upper-le...

5 years ago | 0

| accepted

Answered
How to generate chaotic index between 1 and 256 by hybrid sin-cos map?
The answer is the same as the answer to a previous question: https://www.mathworks.com/matlabcentral/answers/1608410-how-to-conf...

5 years ago | 0

Answered
how to graph function
You could use Data Cursor to create a datatip, or you could try something like this: idx = find(f(:) > 1000 & f(:) < 2500 & PSD...

5 years ago | 0

Answered
How to iterate across a specific diagonal?
N1=2; N2=2; nband=1; n=(N1*N2)*2*nband; t=4; HM = zeros(n); % upper t diagonal for ii = 1:(N1*N2*nband) HM(ii,(N1*N2...

5 years ago | 0

| accepted

Answered
How to initialize particles randomly in a circular structure?
Depending on how you want the randomness to work, there would be different ways to do it. Here's a way that has the circle cente...

5 years ago | 1

Answered
Error in comparing equal matrices
It looks like you are trying to loop over both dimensions of two matrices and compare the elements one at a time, and first you ...

5 years ago | 0

| accepted

Answered
conversion from cell to char is not possible
It looks like Training_Image.Files is a cell array of chars, and you are attempting to take one of those chars and assign it to ...

5 years ago | 0

| accepted

Answered
Unrecognized function or variable
Tell the program what your data folder is DataFolder = 'C:\'; ReadFileNames(DataFolder) function [ FList ] = ReadFileName...

5 years ago | 0

Answered
why do I receive two numbers when I use Find command?
Evidently those two elements of t are within 0.001 of tg. If you want just the first element of t that is within 0.001 of tg you...

5 years ago | 1

Answered
modify uitable cell content directly
There is no (documented) way to update the contents of certain cells without just setting the entire table's Data.

5 years ago | 0

Answered
Find the first 10000 data above threshold
siz = [524288 27]; threshold = 1e-7; A = randn(siz) idx = find(A > threshold,10000)

5 years ago | 0

Answered
XLS File write
You can do this with separate calls to xlswrite() (e.g., one call to write the matrix data, one call to write the column names, ...

5 years ago | 0

Answered
maximization of a quadratic equation
Here you go: https://courses.lumenlearning.com/ivytech-collegealgebra/chapter/determine-a-quadratic-functions-minimum-or-maximum...

5 years ago | 0

Answered
Reading an Undelimited Text File Containing a Binary Matrix
Here is one way to do it: matrix_size = 9; fid = fopen('data.txt'); data = fread(fid); fclose(fid); data(data < 48 | da...

5 years ago | 0

Answered
Comparing very small numbers
Look into using eps() for this.

5 years ago | 0

Load more