回答済み
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

| 採用済み

さらに読み込む