Respondida
how to solve this
exp(pi)*sqrt(163)

alrededor de 4 años hace | 0

| aceptada

Respondida
Why am I getting the error "not enough input arguments"?
The error message is actually saying there aren't enough inputs to the function error_disL (not fit_disL). That happens because ...

alrededor de 4 años hace | 0

| aceptada

Respondida
How to find common value from cell
cc = {[1 2 3],[1 2 4 5];[1 2 8 7 9 5],[1 3 8 7 2]}; result = cc{1}; for jj = 2:numel(cc) result = intersect(result,cc{j...

alrededor de 4 años hace | 0

| aceptada

Respondida
Finding number of points inside a 2.5*2.5 lat-lon grid box using matlab?
T=readtable('Question_data.xlsx'); res = 2.5; % grid box size % lon = -180:res:180; % lat = -90:res:90; lon = linspace(-...

alrededor de 4 años hace | 0

Respondida
Iterating through alternating for loops
It seems like you need only one for loop, where in each iteration you add a single left stride and a single right stride. Somet...

alrededor de 4 años hace | 0

| aceptada

Respondida
Function handle in varargin not recognized
You're calling drawfunction with an expression that MATLAB tries to evaluate before sending the result of that evaluation in to ...

alrededor de 4 años hace | 1

Respondida
How to set bottom repeating elements in matrix to NaN?
a = [ 1 2 3 2 1 3 3 1 1 3 1 2 1 2 3 3 2 1 1 2 1 2 1 3 1 2 3 1 2 1]; to_nan = cummin(a(1:end-1,:) ...

alrededor de 4 años hace | 1

| aceptada

Respondida
Having trouble importing data from file with same name in different folders
Use fullfile with the folder field of totalFiles to construct the full-path name of each file: totalFiles=dir(fullfile(mydir, '...

alrededor de 4 años hace | 0

| aceptada

Respondida
Get the positions of the first logicals (multiple sets) in an array
x = [0.5,1.6,1.5,5.2,8.5,9.3,6.3,2.2,1.9,1.8,7.4,6.4,6.5,2.3,2.4,8.5,7.6,5.3,2.0,2.4]; thresh = 5; x_log = x>thresh One way ...

alrededor de 4 años hace | 1

| aceptada

Respondida
How do I connect points in a scatter plot with lines inside an infinite loop?
You can use animatedline to do this. See the example code below. % create an animatedline speed_line = animatedline('Color','b...

alrededor de 4 años hace | 0

| aceptada

Respondida
How to label one segment of stacked bar graph?
data = [20 10; 20 20; 24 16; 24 16; 24 16; 24 16; 24 16; 20 20; 24 26; 24 46; 20 30; 24 36; 24 46]; labels = {'RC','RC','PC','P...

alrededor de 4 años hace | 1

| aceptada

Respondida
Create an array based on the values in two other arrays
A = [3; 3; NaN]; B = [1 0.25; 2 0.5; 3 0.66; 4 0.76]; C = NaN(size(A)); [ism,idx] = ismember(A,B(:,1)); C(ism) = B(idx(ism...

alrededor de 4 años hace | 0

| aceptada

Respondida
subtitle on a 2x2 grid plot using sgtitle?
folderName = 'MATLAB folder'; fileName = 'test.m'; sgt = sgtitle({['{\bf\fontsize{14}' folderName '}'],fileName});

alrededor de 4 años hace | 0

| aceptada

Respondida
Complex outcome loop change to zeros
"The V_2 plot should give a zero velocity when imaginary number outcome occurs." You can replace complex elements of V_2 with 0...

alrededor de 4 años hace | 0

| aceptada

Respondida
I want to read data and variable name from txt file
For a text file that looks like that, readtable does essentially the right thing: T = readtable('input_file_test.txt'); T.Pr...

alrededor de 4 años hace | 0

| aceptada

Respondida
Is there a function that tells me the elapsed time as the elapsed time continues to run?
figure( ... 'Name','Stopwatch', ... 'NumberTitle','off', ... 'Menubar','none', ... 'Toolbar','none', ... ...

alrededor de 4 años hace | 0

Respondida
Attempting to Plot In A Specific Range
You will need a vector, the same length as y, containing an x value for each y value. Let's say you have that vector and it's c...

alrededor de 4 años hace | 0

Respondida
Converting from comma delimiter to semicolon
type test.csv % initial comma-delimited file T = readtable('test.csv'); ...

alrededor de 4 años hace | 1

Respondida
Elementwise calculations when making a new Table column
Protocol = ["A" "A" "B" "C"]'; Operator = [1 2 2 1]'; Value1 =[4 3 3 8]'; Stats3 = table(Protocol,Operator,Value1) If limits...

alrededor de 4 años hace | 1

| aceptada

Respondida
I want to create cell arrays containing all zero elements in them.
C = repmat({zeros(2600,6)},1,20)

alrededor de 4 años hace | 0

| aceptada

Respondida
vertical or horizontal array random combination in single array
A={[12;13] ;[1,5] ;[5;6;7]; [1,3,5,4]}; % make each element of A a row vector A = cellfun(@(x)x(:).',A,'UniformOutput',false...

alrededor de 4 años hace | 1

Respondida
how to plot separately ..plots getting replaced?
You had some syntax errors in constructing your file names, and a missing argument in your calls to figureplots*. Check the cod...

alrededor de 4 años hace | 0

Respondida
Add a specific line or point in boxplots
Here's how you can set the value of those median lines. In this example I'll change them from the median MPG to the mean MPG (y...

alrededor de 4 años hace | 0

| aceptada

Respondida
trying to output the indeces for plus minus 5 from each value in an array
If you compare a column vector to a row vector, you get a matrix that is the result of comparing each element of one vector to a...

alrededor de 4 años hace | 0

| aceptada

Respondida
Multiple Maximas in multiple matrices
% data matrix1=[10:1:15]; matrix2=[15:1:25]; matrix3=[25:1:35]; %max maxValue = cellfun(@max,{matrix1 matrix2 matrix3})

alrededor de 4 años hace | 1

| aceptada

Respondida
Issue with Plotting Data set based on Checkboxes in MATLAB App Designer
I guess I would get the data to plot based on the selected checkboxes in app.UITable directly, without using app.SelectedDevices...

alrededor de 4 años hace | 1

| aceptada

Respondida
Extract a column from cell array containing arrays
% 400x30 cell of 1x3 random vectors: C = reshape(num2cell(rand(400*30,3),2),400,[]) % first element of the vector in each cell...

alrededor de 4 años hace | 1

| aceptada

Respondida
Why I cannot see any result on my graph
Instead of this: plot(i,SXsol(i)) try this: fplot(SXsol,[0 300]) or this: t_plot = 0:10:300; plot(t_plot,SXsol(t_plot))

alrededor de 4 años hace | 1

| aceptada

Respondida
Select columns of a table using matching column names
v = {'Var1' 'Var3'} T = table([1;2;3],[4;5;6],[7;8;9]) % a table of the selected columns of T: new_T = T(:,v) % or, the data...

alrededor de 4 años hace | 1

| aceptada

Respondida
Remove Terms in Complex Valued Data That Has Only Real or Imaginary Part
load LR disp(LR); One way: % remove elements of LR whose real part is 0 or imaginary part is 0 LR(real(LR) == 0 | imag(LR) =...

alrededor de 4 años hace | 1

| aceptada

Cargar más