답변 있음
Removing rows of table based on logical array
I think the problem is with this line: TT = data(:,7) < 1.01 With data being a table, I get the error, "Undefined operator '<'...

거의 3년 전 | 2

| 수락됨

답변 있음
how to plot two variables having different length y1 it's size (1x1500) and y2 (1x1200) at the same figure according to steps in time (X-axis)
% two random vectors of different lengths y1 = cumsum(randn(1,1500)); y2 = cumsum(randn(1,2000)); % plot them plot(y1) ho...

거의 3년 전 | 0

| 수락됨

답변 있음
merge cell array
Here's a guess % "one column of numerical data": A = {[0 1]; [0 2]; [0 3]} % "one column of text data": B = {'AT'; 'DE'; 'FR...

거의 3년 전 | 0

답변 있음
Problems with cell array plotting
Change this: currentsc = datacurrents{i}(:, [2 3 4]); to this: currentsc{i} = datacurrents{i}(:, [2 3 4]);

거의 3년 전 | 0

답변 있음
Assign a value to a matrix element defined as a variable
prop = @(x)[x([repmat([1 3],11,1); repmat([2 4],12,1)]) zeros(23,2)];

거의 3년 전 | 1

답변 있음
extract row from a cell
a = {'home'}; b = {'ball' , 'cake' , 'ice'}; c = {'car','moto'}; d = {'money','supercar','toys'}; e = cell(4,0); e(1,1:nume...

거의 3년 전 | 0

| 수락됨

답변 있음
only consider fields that exist within a structure
Use isfield. if isfield(mystruct_1,'row') && isfield(mystruct_1,'column') % row and column exist row = mystruct_1.row; ...

거의 3년 전 | 0

| 수락됨

답변 있음
Create multiple subplot from one loop
% some made-up data, for demonstration: xs = 1:17; yinternew = reshape(1:17*359,17,[]); n_lines = 20; % 20 lines per subplo...

거의 3년 전 | 1

| 수락됨

답변 있음
Vector element replacement by specified variables
x = [1 2 5]; y = 1+log(x); x,y

거의 3년 전 | 0

| 수락됨

답변 있음
center text in app designer
Per the documentation, "Text areas are UI components for entering multiple lines of text." Therefore, it makes sense that they d...

거의 3년 전 | 1

답변 있음
I have an expression error in my code
Use single quotes instead of double quotes around omitnan, as in: cc=sum(bb,'omitnan');

거의 3년 전 | 0

답변 있음
why do i receive "Unable to perform assignment because brace indexing is not supported for variables of this type".
Brace indexing (using {}) is for cell arrays (or tables), but FYPdatabase is a numeric array, so that's why the error happens. ...

거의 3년 전 | 0

답변 있음
How can i call exact cell value from excel to edit field value in Matlab App
Use curly braces {} to get content from the table t: app.MassEditField.Value = t{2,"Var2"}; app.ForceEditField.Value =t{13,"Va...

대략 3년 전 | 0

| 수락됨

답변 있음
Saving a matrix to a series of different created folders
for part = 1:3 BoolMat1 = [1,1,1]; dir_name = sprintf('C%g',part); mkdir(dir_name) f...

대략 3년 전 | 0

| 수락됨

답변 있음
How can I calculate the index of when the sequence starts to repeat?
The idea here is to successively check whether V is the same as a repeated sequence of its first T elements. Starting with T = 1...

대략 3년 전 | 1

| 수락됨

답변 있음
Caesar's cypher working incorrectly
I can't find the function islower in MATLAB. Maybe that's a function you wrote yourself, and if so maybe it works correctly, but...

대략 3년 전 | 0

답변 있음
How do I loop over all columns in a cell array?
load('balls_data.mat') balls_data is a cell array of cell arrays, except for two cells, which contain empty 0-by-0 numeric matr...

대략 3년 전 | 1

답변 있음
App designer Edit field, position
pos1 = "[1 2 3 4]"; pos = str2num(pos1)

대략 3년 전 | 0

| 수락됨

답변 있음
Trying to answer a math problem using newton's method but having problem in the function.
Multiplication is * or .* but never . as in 4.x and never implicit as in (x^2)z log10 is base-10 logarithm. log is natural loga...

대략 3년 전 | 0

답변 있음
How to delete a specified string value in a nested cell array
If AOI is a cell array of cell arrays of character vectors, like this: AOI = {{'AOI 1';'AOI 2';'NO AOI';'AOI 3'}; {'NO AOI';'NO...

대략 3년 전 | 0

| 수락됨

답변 있음
I want to use fprintf to make a table of results
fprintf(' %6.3f %6.3f\n', [standard, average].')

대략 3년 전 | 0

답변 있음
How to create multiple structure variables and assign values to them at one line.
One way: [AC.a, AC.b] = deal(5, 15); AC Another way: C = {5, 15}; [AC.a, AC.b] = C{:}; AC https://www.mathworks.com/h...

대략 3년 전 | 0

답변 있음
How to append cell arrays to from a unique array and then fill one of its column out with data from excel sheets?
Obviously if you just wrapped that code in a loop, your variable stations1 would be overwritten on each iteration of that loop, ...

대략 3년 전 | 0

| 수락됨

답변 있음
How can I fix the error: Index exceeds the number of array elements (1)?
clear B_n = -5.36; omega_d = 400; zeta = 29; tt=0.01; upTo_t=10; N = upTo_t*100; total = zeros(N, 1); t=0.01*(1:N); f...

대략 3년 전 | 0

| 수락됨

답변 있음
How can I replace a certain pattern in a string?
One way: oldstr = 'abbabba'; oldp = 'abba'; newp = 'aaaa'; newstr = regexprep(regexprep(oldstr,oldp,newp),oldp,newp);

대략 3년 전 | 0

| 수락됨

답변 있음
Merging strings in a table
L = readtable( fileLog ); L2 = convertvars(mergevars(L,["Var2","Var3"]),"Var2",@(a)join(a," "));

대략 3년 전 | 0

답변 있음
How can I add the elements ascending in this code
B = Mf-cumsum(D);

대략 3년 전 | 0

답변 있음
Error in for loop (issue with variable calling)
Time{i} is all the times from the file. To get the times of the peaks found by findpeaks, index Time{i} with the peak locations ...

대략 3년 전 | 1

| 수락됨

답변 있음
Index of element to remove exceeds matrix dimensions
Let's examine what happens on the first iteration of that for loop. for i = 1:Np First time through the loop, i is 1. idx...

대략 3년 전 | 0

| 수락됨

더 보기