Feeds
已回答
figure is not being displayed
All the plots in the 2nd, 3rd, and 4th figures are based on scalars. Plotting a scalar is plotting a single point, so it's not g...
figure is not being displayed
All the plots in the 2nd, 3rd, and 4th figures are based on scalars. Plotting a scalar is plotting a single point, so it's not g...
3 hours 前 | 0
已回答
Need help to run the Matlab code
"No. of Bees" must be a positive even number. "Dim" mut be 1 or 2. "Iteration" must be a positive integer. "Run" must be a posit...
Need help to run the Matlab code
"No. of Bees" must be a positive even number. "Dim" mut be 1 or 2. "Iteration" must be a positive integer. "Run" must be a posit...
3 hours 前 | 0
已回答
how to plot directly from value in app designer?
Assuming those are numeric edit fields called "InsEdit1", "InsEdit2", ..., and "TimeEdit1", "TimeEdit2", ..., then here's one wa...
how to plot directly from value in app designer?
Assuming those are numeric edit fields called "InsEdit1", "InsEdit2", ..., and "TimeEdit1", "TimeEdit2", ..., then here's one wa...
3 hours 前 | 0
已回答
My pie chart wont show up
I assume the problem is that your code calls plotCostBreakdown when it should call costBreakdown (or that the costBreakdown func...
My pie chart wont show up
I assume the problem is that your code calls plotCostBreakdown when it should call costBreakdown (or that the costBreakdown func...
4 hours 前 | 0
已回答
Do calculations in csv data one csv file at the time
Something like this; adjust as necessary. % use dir() to get info about the relevant csv files: csv_dir = '.'; F = dir(fullfi...
Do calculations in csv data one csv file at the time
Something like this; adjust as necessary. % use dir() to get info about the relevant csv files: csv_dir = '.'; F = dir(fullfi...
4 hours 前 | 0
已回答
'Text' must be character vector issue in app designer
You can store the buttons in an array (not a cell array), and you don't need to put x in a cell array either. Also, reshape is n...
'Text' must be character vector issue in app designer
You can store the buttons in an array (not a cell array), and you don't need to put x in a cell array either. Also, reshape is n...
1 day 前 | 1
| 已接受
已回答
Matrix dimensions must agree
Read the descriptions on the pcolor documentation page for X, Y, and C - specifically how their sizes must be related. Then che...
Matrix dimensions must agree
Read the descriptions on the pcolor documentation page for X, Y, and C - specifically how their sizes must be related. Then che...
1 day 前 | 0
已回答
Fill function not accepting hexadecimal colors
A = [2 2 4 4]; B = [5 3 3 5]; patch("XData",A,"YData",B,"FaceColor","#0000FF");
Fill function not accepting hexadecimal colors
A = [2 2 4 4]; B = [5 3 3 5]; patch("XData",A,"YData",B,"FaceColor","#0000FF");
1 day 前 | 0
| 已接受
已回答
How can I extract an array of numbers from a text-formatted cell array of strings.
data = { '20s' '15m' '' '24s' '' '44s' '3h' '40m' '20s' '' '14s' }; ...
How can I extract an array of numbers from a text-formatted cell array of strings.
data = { '20s' '15m' '' '24s' '' '44s' '3h' '40m' '20s' '' '14s' }; ...
1 day 前 | 0
已回答
How to Convert a Scalar Struct with Vector Fields to a Vector Struct with Scalar Fields?
S.x = [1 2]; S.y = [10 20]; N = numel(S.x); f = fieldnames(S); NF = numel(f); clear A A(N) = S; for ii = 1:N for...
How to Convert a Scalar Struct with Vector Fields to a Vector Struct with Scalar Fields?
S.x = [1 2]; S.y = [10 20]; N = numel(S.x); f = fieldnames(S); NF = numel(f); clear A A(N) = S; for ii = 1:N for...
2 days 前 | 0
已回答
How to Convert a Scalar Struct with Vector Fields to a Vector Struct with Scalar Fields?
S.x = [1 2]; S.y = [10 20]; C = [fieldnames(S) , cellfun(@num2cell,struct2cell(S),'Uni',false)].'; A = struct(C{:}) [A.x] ...
How to Convert a Scalar Struct with Vector Fields to a Vector Struct with Scalar Fields?
S.x = [1 2]; S.y = [10 20]; C = [fieldnames(S) , cellfun(@num2cell,struct2cell(S),'Uni',false)].'; A = struct(C{:}) [A.x] ...
2 days 前 | 0
已回答
How to Convert a Scalar Struct with Vector Fields to a Vector Struct with Scalar Fields?
S.x = [1 2]; S.y = [10 20]; C = [fieldnames(S) , struct2cell(structfun(@num2cell,S,'Uni',false))].'; A = struct(C{:}) [A.x...
How to Convert a Scalar Struct with Vector Fields to a Vector Struct with Scalar Fields?
S.x = [1 2]; S.y = [10 20]; C = [fieldnames(S) , struct2cell(structfun(@num2cell,S,'Uni',false))].'; A = struct(C{:}) [A.x...
2 days 前 | 0
| 已接受
已回答
How to interpolate and smooth across values in a matrix, while ignoring NaN values?
Avoid putting NaNs into the scatteredInterpolant: idx = ~isnan(scan2); interpImage = scatteredInterpolant(micsX(idx),micsY(idx...
How to interpolate and smooth across values in a matrix, while ignoring NaN values?
Avoid putting NaNs into the scatteredInterpolant: idx = ~isnan(scan2); interpImage = scatteredInterpolant(micsX(idx),micsY(idx...
2 days 前 | 0
| 已接受
已回答
Aligning then subtracting unequal length column vectors
xspots = [ 2600.00 2679.00 2802.00 2924.00 3046.00 3169.00 3291.00 3413.00 3536.00 3658.00 3781.00]; xgrid = [ 26...
Aligning then subtracting unequal length column vectors
xspots = [ 2600.00 2679.00 2802.00 2924.00 3046.00 3169.00 3291.00 3413.00 3536.00 3658.00 3781.00]; xgrid = [ 26...
2 days 前 | 0
| 已接受
已回答
Problem 56313. Find Air Temperature from Cricket Stridulation Rate
function y = getTemperature_F(x) y = x+40; end
Problem 56313. Find Air Temperature from Cricket Stridulation Rate
function y = getTemperature_F(x) y = x+40; end
2 days 前 | 0
已回答
how to modify data of a matlab figure?
% open figure once for reference openfig('PMSG1_Q1ter.fig'); % constant to multiply one line's YData by const = 0.98; % op...
how to modify data of a matlab figure?
% open figure once for reference openfig('PMSG1_Q1ter.fig'); % constant to multiply one line's YData by const = 0.98; % op...
2 days 前 | 0
已回答
INDEX EXCEEDS THE NUMBER OF ARRAY ELEMENTS.
My guess is that x is a matrix but your code is assuming it's a vector. Example: x = rand(2,232); signal_length = length(x)...
INDEX EXCEEDS THE NUMBER OF ARRAY ELEMENTS.
My guess is that x is a matrix but your code is assuming it's a vector. Example: x = rand(2,232); signal_length = length(x)...
2 days 前 | 1
| 已接受
已回答
Creating a loop for repeated vector values
No loops necessary. If those are row vectors, then: newPARCdata = [PosAccelReqCurrent(15)*ones(1,6500) zeros(1,100) 15*ones(1,...
Creating a loop for repeated vector values
No loops necessary. If those are row vectors, then: newPARCdata = [PosAccelReqCurrent(15)*ones(1,6500) zeros(1,100) 15*ones(1,...
2 days 前 | 1
| 已接受
已回答
table with NaNs into separate cells
% making a table with some all-NaN rows: Var = randi(100,12,4); Var([3 9],:) = NaN; M = array2table(Var) % split the table o...
table with NaNs into separate cells
% making a table with some all-NaN rows: Var = randi(100,12,4); Var([3 9],:) = NaN; M = array2table(Var) % split the table o...
3 days 前 | 2
| 已接受
已回答
Reshaping a matrix based on the first row
Here's one way: A = [270 270 270 271 272 272 273 273 273]; B = [ 12 2 3 14 5 2 6 8 11]; [~,~,cidx] = unique(A...
Reshaping a matrix based on the first row
Here's one way: A = [270 270 270 271 272 272 273 273 273]; B = [ 12 2 3 14 5 2 6 8 11]; [~,~,cidx] = unique(A...
3 days 前 | 0
已回答
How do I change and save Check Box name in app designer so that it loads when I restart the app next time?
The main thing is that state has one field, which is "CheckBox", so it doesn't make sense to refer to state.InputEditField in lo...
How do I change and save Check Box name in app designer so that it loads when I restart the app next time?
The main thing is that state has one field, which is "CheckBox", so it doesn't make sense to refer to state.InputEditField in lo...
3 days 前 | 1
| 已接受
已回答
How do variables work in Matlab App Designer?
"Does this mean that if I define variables in the function, I can't call upon those same variables in other parts of the code?" ...
How do variables work in Matlab App Designer?
"Does this mean that if I define variables in the function, I can't call upon those same variables in other parts of the code?" ...
3 days 前 | 0
已回答
Filled error bars to a plot
growth = readtable("growthWT2.xlsx"); time = growth.Time_h_; % no [ ] required timeOD = growth.Time_h__1; DO_1 = growth.O...
Filled error bars to a plot
growth = readtable("growthWT2.xlsx"); time = growth.Time_h_; % no [ ] required timeOD = growth.Time_h__1; DO_1 = growth.O...
3 days 前 | 0
| 已接受
已回答
how to join two cell array
F = @(varargin)vertcat(varargin{:}); frameTOS = cellfun(F,frameTOS1,frameTOS2,'UniformOutput',false);
how to join two cell array
F = @(varargin)vertcat(varargin{:}); frameTOS = cellfun(F,frameTOS1,frameTOS2,'UniformOutput',false);
3 days 前 | 1
| 已接受
已回答
Plot a Cilinder or Sphere 3D
Still not sure what the matrix represents, but here is something: M = readmatrix('New Sphere 3D.txt'); angles = M(1,1:end-1); ...
Plot a Cilinder or Sphere 3D
Still not sure what the matrix represents, but here is something: M = readmatrix('New Sphere 3D.txt'); angles = M(1,1:end-1); ...
3 days 前 | 0
| 已接受
已回答
Graph 3D Spheres
M = readmatrix('New Sphere 3D.txt'); angles = M(1,1:end-1); z = M(2:end,1); M(1,:) = []; M(:,1) = []; whos M z angles di...
Graph 3D Spheres
M = readmatrix('New Sphere 3D.txt'); angles = M(1,1:end-1); z = M(2:end,1); M(1,:) = []; M(:,1) = []; whos M z angles di...
3 days 前 | 0
已回答
Can you do the writeline function without the added terminator?
This documentation page: https://www.mathworks.com/help/instrument/serialport.configureterminator.html states that the "Allowe...
Can you do the writeline function without the added terminator?
This documentation page: https://www.mathworks.com/help/instrument/serialport.configureterminator.html states that the "Allowe...
4 days 前 | 0
| 已接受
已回答
Vector Length Error when Calling Function
You have a variable called "length": length = data(2:end,2) Later, on this line: x_values1 = 1:length(PPI) the existence of ...
Vector Length Error when Calling Function
You have a variable called "length": length = data(2:end,2) Later, on this line: x_values1 = 1:length(PPI) the existence of ...
4 days 前 | 0
已回答
Find exact vector order in another vector array
If I understand correctly, you want to find where in a large vector (event_codes, size 1x19277) a small vector (e.g., att_event_...
Find exact vector order in another vector array
If I understand correctly, you want to find where in a large vector (event_codes, size 1x19277) a small vector (e.g., att_event_...
4 days 前 | 0
| 已接受