已回答
How to count the number of non-nan values for combination of multiple variables
% Initial table a = [1;1;1;2;2;2;2]; b = [660; 661; 661; 663; 663; NaN; 663]; c = [1;2;2;5;5;NaN;6]; d = [11;12;NaN; 13; 14;...

3 months 前 | 0

| 已接受

已回答
What does the syntax matrix(vector) mean?
Indexing. https://www.mathworks.com/company/technical-articles/matrix-indexing-in-matlab.html

3 months 前 | 0

| 已接受

已回答
Unrecognized function or variable 'RK'.
https://www.mathworks.com/matlabcentral/answers/96005-why-do-i-get-the-error-unrecognized-function-or-variable

3 months 前 | 0

已回答
How do I draw contours on multiple surfaces so that they line up
Maybe specifying a vector of contour levels, rather than the number of levels, is appropriate. For example: lev = 0.01:0.01:0.0...

3 months 前 | 0

| 已接受

已回答
Error using feval Function to evaluate must be represented as a string scalar, character vector, or function_handle object.
Use the 's' (or "s") option in input() in order to store the result as text without evaluating it: fname = input('\n M-file con...

3 months 前 | 0

已回答
A problem with a code that works as it is but gives an index error when is used inside a function
Based on the error message, "Index in position 2 exceeds array bounds. Index must not exceed 100. Error in cleaner (line 118) z...

3 months 前 | 0

已回答
How can I write a 'for' loop that sums up all elements of a vector?
a = 1:5; total = 0; for ii = 1:numel(a) total = total+a(ii) end

3 months 前 | 0

已回答
Iterate over struct with length>1, with multiple fields
teststruct = struct('name', {'Alice', 'Bob', 'Eve'}, 'age', {24, 45, 35}) names = {teststruct.name} ages = [teststruct.age] O...

3 months 前 | 0

| 已接受

已回答
How to plot RGB histogram of an image into a single 3D slice plot?
image = imread('peppers.png'); R = image(:,:,1); G = image(:,:,2); B = image(:,:,3); subplot(2,2,1); imshow(image); titl...

3 months 前 | 2

| 已接受

已回答
i have a vector in lenght 5, i need to check if a sum of 2 or more elements in the vector is equal to another element at the same vector how to do that?
v = [10 5 13 15 28]; m = dec2bin(0:2^numel(v)-1)-'0'; m = m(sum(m,2) >= 2,:); [ism,idx] = ismember(m*v.',v); idx = idx(ism...

3 months 前 | 3

已回答
Matrices à coefficients dépendant d'un paramètre
One option: F = @(t)[0,1;t,t^2]; M = F(1) M = F(-1) M = F(2) Another option: syms t M = [0,1;t,t^2]

3 months 前 | 0

| 已接受

已回答
Fill in the missing time stamps in measurment data when the system is runnign but not when the system was OFF
Data1 = readtimetable('Data1.xlsx'); Data2 = readtimetable('Data2.xlsx'); Data3 = readtimetable('Data3.xlsx'); Maybe one of t...

3 months 前 | 0

| 已接受

已回答
Arrays have incompatible sizes for this operation error while checking dropdown.value not equal to a char value
Don't use == or ~= to compare character arrays, use strcmp, i.e.: if ~strcmp(app.SelectBatteryDropDown.Value,'none') because =...

3 months 前 | 0

| 已接受

已回答
Function file doesn`t work
T = readtable('Lab5_R_100_MOhm.txt','VariableNamingRule','preserve') f = T.(1); A = T.(2); Ph = T.(3); figure tiledlayout...

3 months 前 | 0

已回答
re-indexing slices of a matrix
A = [1 4 4 4 3 4 6 3 3 3 2 1 3 1 7 2 5 2 9 2 5 1 4 1]; A(:,2) = 1+c...

3 months 前 | 0

| 已接受

已回答
I am trying to figure out how to use writetable instead of xlswrite, but the feature is converting my numbers to text. Headers are text.
Excel_Sheet = array2table(Excel_out,'VariableNames',Excel_head); writetable(Excel_sheet,'C:\D_Local\MATLAB\AAA\PhaseII_CA_out.x...

3 months 前 | 0

已回答
Selectin elements that satisfy a certain condition with modular arithmetic
N = 6; m = 3; M = dec2base(0:m^N-1,m)-'0'; idx = mod(M(:,1)+M(:,4)+M(:,5),m) == 1 ... & mod(M(:,2)+M(:,5)+M(:,6),m) ...

3 months 前 | 0

| 已接受

已回答
Not recognizing any text files in folder using dir(fullfile)
Try folder_path = 'C:\users\power\downloads\star capillary files\'; instead of folder_path = 'C:users\power\downloa...

3 months 前 | 0

已回答
How can I use selections from multiple uidropdowns as function inputs?
Here's an example of how it could work: function uidropdown_demo() T = array2table([(1:25).' [10 100].*rand(25,2)], ... ...

3 months 前 | 0

已回答
Show coordinates for a 2D point in a table cell
One way to display a vector in a single cell of a uitable is to make it into a string: app.PointsTable.Data = table( ... '...

3 months 前 | 0

| 已接受

已回答
Error: Data must be numeric, datetime, duration, categorical, or an array convertible to double.
tic close all; clc; % Declaring Theta and Phi Variables theta = 0:0.1:pi/2; % Phi Values phi_E_Plane = 0; phi_H_Plane ...

3 months 前 | 0

| 已接受

已回答
When plotting multiple subplots in the for loop, how do you stop the axes from overlapping?
axes(t) where t is a tiledlayout, creates a new axes in t, so your code is creating a new axes on each iteration of the loop. Th...

3 months 前 | 0

已回答
How to create a summation looping through one matrix while keeping another one constant?
[nr,nca] = size(A); ncb = size(B,2); C = zeros(nr,nca); for r = 1:nr for ca = 1:nca for cb = 1:ncb ...

3 months 前 | 0

已回答
how convert arraycell to use with writecell
AA = load('matlab_writeCell.mat').bubu % write the cell array to file using space as the delimiter: writecell(AA,'myTextFile.t...

3 months 前 | 0

| 已接受

已回答
Trying to make a 2 value sz vector, get Error using tabular/horzcat All input arguments must be tables.
T = table([1;2;3;4],{'ok';'let''s';'see';'here'}) Given the table T above, T(1,:) is another table containing the first row of ...

3 months 前 | 0

| 已接受

已回答
Find Selected button in Button Group CallBack
function ManualRewardsButtonGroupSelectionChanged(app, event) selectedButton = app.ManualRewardsButtonGroup.SelectedObject;...

3 months 前 | 0

| 已接受

已回答
Code checking error in App Designer, it thinks xxxx.BackgroundColor is a scalar
To avoid the warning, use: if isequal(app.STOPTRIALSButton.BackgroundColor,[0.95 0.33 0.10]) app.STOPTRIALSButton.Backgrou...

3 months 前 | 0

已回答
Unrecognized function or variable 'efficiency'
You might get that error if the arguments you give to efficiency() are not correct. For example, calling it like this works: a...

3 months 前 | 1

| 已接受

已回答
How to convert a table containing numbers and booleans to a double array?
T = load('example.mat').data3 M = [strcmpi(T.var1,'TRUE') T.var2]

3 months 前 | 0

| 已接受

已回答
Error when using resample and smooth surfaces in CAT12
Here are lines 232-242 of cat_surf_info.m: [~,ff2] = spm_fileparts(SPM.xY.VY(1).fname); % find mesh string hemi_i...

3 months 前 | 0

加载更多