Answered
Why do I get this error 'Array indices must be positive integers or logical values.'
Perhaps a missing operator after k7. Perhaps a *

2 years ago | 0

Answered
Sum matrixes from cells
sum(cat(3,C{:}),3)

2 years ago | 0

| accepted

Answered
cant call function from a file
Use if input_bits(bit) == '0' instead of if bit == '0' and similarly for the elseif statement. bit is the index; input_bit...

2 years ago | 1

| accepted

Answered
how to draw contour error graph by using vector-like formation data
% plot the contour f = @(x,y)5*x.^2-6*x.*y+5*y.^2; [X,Y] = meshgrid(linspace(-1.5,1.5,100)); contour(X,Y,f(X,Y),linspace(0.5,...

2 years ago | 1

| accepted

Answered
Image recognition of numbers
Try changing the specified Layout type to 'word' load image imshow(TEMP) ocrOutput = ocr(TEMP, 'TextLayout', 'word', 'chara...

2 years ago | 0

Answered
Function with ln and sin
These are the MATLAB functions you might need: https://www.mathworks.com/help/matlab/ref/log.html https://www.mathworks.com/he...

2 years ago | 0

Answered
Conversion of Categorical to char while maintaining same dimension
You cannot do that in general. In the special case that all the categories are a single character long, then you can do it: m ...

2 years ago | 1

| accepted

Answered
Hello, I have an array of values in "In", I would like to extract the samples in "In" between the indices specified in "SIdx" and "EIdx". SIdx and EIdx are also arrays.
In = 1:100; SIdx = [1 9 33 76]; EIdx = [5 13 42 83]; siz = zeros(1,2*numel(SIdx)-1); siz(1:2:end) = EIdx-SIdx+1; siz(2:2:...

2 years ago | 0

| accepted

Answered
find value every time counter increase by 2.
a = [0 0 0 0 1 1 2 2 3 3 3 3 4]'; %Counter b = [0 1 2 3 4 5 6 7 8 9 10 11 12]'; %value to be found c = [0 0 0 0 0 1 1 0 0 ...

2 years ago | 0

| accepted

Answered
Is there a way to refer to elements in Matlab App using variables?
for r = 1:3 for c = 1:3 app.(sprintf('Button_%d_%d',r,c)).Text = app.images(app.grid(r,c),1); end end

2 years ago | 0

| accepted

Answered
Hello, I have a cell array with the list of files I would like to delete. However I would not like to use a for loop to loop through each file to delete it.
Pass the file names as arguments to delete(). Since the names are already in a cell array, this is easy: delete(Files{:}) Demo...

2 years ago | 4

| accepted

Answered
Interpolation to arbitrary points on a patch plot
%Values of points q = [0;2.00997512422418;2.11482859825566;0;... 1.50960259671213;1.00498756211209;1.47648230602334]; RGB...

2 years ago | 0

| accepted

Answered
How can I save axes data for recall without keeping the handle?
You can use the syntax subplot(m,n,p,ax) to use an existing axes as a subplot in the same figure. Example: % create a figure a...

2 years ago | 0

| accepted

Answered
How can I change the colour of the axes?
hfig = figure; % save the figure handle in a variable num = [1]; den = [1 20 20]; sys = tf(num, den); ts = 0.01; sys_d =...

2 years ago | 0

| accepted

Answered
how to plot phase and frequency
K = 0.5; t_d = 0.001; % 1 ms f = linspace(0,10000,1000); % 1000 f values from 0 to 10 kHz Av = 1+K*exp(-1j*2*pi*f*t_d); ...

2 years ago | 1

Answered
Save an annotation onto a figure programmatically in app designer
Annotations are children of an annotation pane which has HandleVisibility 'off' by default, so it doesn't show up in the parent ...

2 years ago | 0

| accepted

Answered
How to plot from a specific point?
Vector=[20;50;0]; Traslacion=[10;-15;10]; XYZ = [Vector,Traslacion]; plot3(XYZ(1,:),XYZ(2,:),XYZ(3,:),'r','LineWidth',3) ...

2 years ago | 0

Answered
How to generate different filename with each iteration of code?
mypath = "C:\"; % string (with double quotes) methods = {'OLS', 'RF'}; dependent_vars = {'act_y_ha', 'act_per_ha'}; % strin...

2 years ago | 0

Answered
Applying Colormaps to Scatter3 Plots
"Do you have any idea how I could correlate the color of the point to the z-axis?" If that's what you want to do, the easy way ...

2 years ago | 0

| accepted

Answered
Arrays have incompatible sizes for this operation.
It seems unlikely that you mean to be doing numerical operations on character vetors like that 1/2.*'sigma_0' Maybe you meant ...

2 years ago | 0

| accepted

Answered
How to solve this problem?
y = 0.3; df = rand(3,4) % random matrix df = double(df >= y)

2 years ago | 0

Answered
I want to add a next page for my appdesigner, how do I code the 'next page' button to lead me from homepage to next pagee?
Here's a simple app with a tab group and two buttons that navigate back and forth through the tabs. The tab group is taller than...

2 years ago | 0

Answered
Plotting a function inside of another function with no outputs
You need to pass the inputs to projAlt_kweave19 v_0=200; theta_0=45; t=(1:1:100); plotProj_kweave19(v_0,theta_0,t) % call plot...

2 years ago | 1

| accepted

Answered
how to plot 50 percentile?
filename = 'Book11.csv'; M = readtable(filename); disp(M) a=M{:,3}; rcs=M{:,4}; idx = a >=120 & a <= 240; p = a(idx); ...

2 years ago | 0

Answered
Split bar chart with specific colours for each variable
ydata(k) is a single element of ydata, so b1 = bar(xdata(k), ydata(k)); produces a single bar, i.e., b1 is of length 1. Trying...

2 years ago | 0

| accepted

Answered
Load one file from many different folders
You can use wildcard characters in dir to find files in many different folders. Examples: % some directory that contains all f...

2 years ago | 0

| accepted

Answered
Removing risidual ticks from second x axis
You can turn the "box" off for any axes that has it on, which removes the axes lines and ticks from the sides opposite the AxisL...

2 years ago | 0

| accepted

Answered
Having issue in Start date and end date picker to plot data to graph from excel data
Here's one way to get the table app.t to contain data in a form that's convenient for plotting, rather than cell arrays of chara...

2 years ago | 0

| accepted

Answered
Memasukkan Grafik Beberapa Gelombang yang Digabung ke dalam Desai Axes GUI
Delete the line figure;

2 years ago | 0

| accepted

Answered
How to have Row Names extend to empty rows.
filename = 'C3_NGHD_E369.e001.p000_Freightliner_DD13_2021_ModeAB_11Spd_C3_1.txt'; T = readtable(filename, 'Delimiter',{',',';',...

2 years ago | 0

| accepted

Load more