Respondida
How to put a colorbar between the columns in tiledlayout?
One solution is to use nested tiledlayouts; in this case a 1x2 tiledlayout containing two 3x1 tiledlayouts. figSlices = figure(...

29 días hace | 0

| aceptada

Respondida
How do I add space between any specific word in string
str = 'double function_name(double name1, float name2, double name3)' newstr = strtrim(strrep(regexprep(str,'([\(\),])',' $1 ')...

alrededor de 1 mes hace | 0

Respondida
Help organizing legend for bar graph
str is a column vector, so use semicolons (instead of commas) to append new elements str = [str;"went to patch 1 and found food...

alrededor de 1 mes hace | 0

| aceptada

Respondida
How to choose 60 unique coordinates ('A') from 600 coordinates('B'), nearest to 60 other coordinates('C')
C = rand(60,2); B = rand(600,2); [~,idx] = min(sum((permute(C,[1 3 2])-permute(B,[3 1 2])).^2,3),[],2); A = B(idx,:); fi...

alrededor de 1 mes hace | 0

Respondida
I am unable to successfully pass data in a multiwindow app. Can someone help me understand where I am going wrong?
See if the attached updated mlapp files work the way you intend and the code makes sense.

alrededor de 1 mes hace | 0

| aceptada

Respondida
Changing the colours in heatmap for specific ranges in values
Here's one way: xvalues = {'0 cm','1 cm','5 cm','10 cm','15 cm','20 cm','24 cm','25.3 cm'}; yvalues = {'30 mm','25 mm','20 mm'...

alrededor de 1 mes hace | 0

| aceptada

Respondida
Use specific variable from index to plot answer of equation
If you want to calculate delta_rfO for all combinations of the specified values of T, Q, and Beta, you can permute (or transpose...

alrededor de 1 mes hace | 0

| aceptada

Respondida
Why do I receive error "Not enough input Argument"? Error in CreatePoints (line 7) plotPoints = linspace(lowValue, highValue, 5);
You need to provide inputs to the function when you run it, i.e., you cannot just click on the green Run button because that doe...

alrededor de 1 mes hace | 1

Respondida
Help with 6.1.1: Array resizing: Removing elements. in Zybook
pendingTasks is passed as input to the RemoveTasks function, so you shouldn't redefine pendingTasks inside the function. That i...

alrededor de 1 mes hace | 1

| aceptada

Respondida
Find index of rows in tables with two conditions doesn't work using &&
Use & to operate on non-scalar arrays: indx = find(T.YPosNanometer == 0 & T.ZPosNanometer == 0)

alrededor de 1 mes hace | 0

| aceptada

Respondida
surface & colormap with "thermometer" map
Seems fine. N = 255; cmap = uint8([N*ones(1,N), N:-1:0; 0:N-1, N:-1:0; 0:N, N*ones(1,N)].'); figure z = peaks(200); surf(...

alrededor de 1 mes hace | 0

| aceptada

Respondida
Multiply different sized arrays by cycling smaller array
Perhaps one of these is what you describe: a = [1,2,3]; b = [4,5,6,7,8]; c = a.'.*b c = a.*b.' c = reshape(c,1,[])

alrededor de 1 mes hace | 0

Respondida
Concatenating multiple struct fields into a single matrix or array but maintaining dimensions
For demonstration, first I create a similar struct, with 3 fields in A.B.C: N = 3; args = [compose('name%02d',1:N); permute(nu...

alrededor de 1 mes hace | 0

| aceptada

Respondida
Receiving Errors with this code
% Define range of PID gains to explore Kp_range = 0:0.1:5; Ki_range = 0:0.1:1; Kd_range = 0:0.1:0.5; % Define setpoint tem...

alrededor de 1 mes hace | 0

Respondida
How to accelerate the running speed of this code?
Here's an approach that may or may not be faster (depending on the size of your array X) and may or may not run (depending on th...

alrededor de 1 mes hace | 0

Respondida
Not able to use imread on images in subfolders
Take the first two outputs from uigetfile (the second output is the location of the selected file), and construct the full path ...

alrededor de 1 mes hace | 1

| aceptada

Respondida
Mean of selected range of a matrix based on a range of values from another matrix
load('data_my.mat') T = table(month,sa,ta,sig); % only sig 27.4 to 27.5 idx = sig >= 27.4 & sig < 27.5; G = groupsummary...

alrededor de 1 mes hace | 2

| aceptada

Respondida
MATLAB Giving "Dot indexing is not supported for variables of this type" Error When Attempting To Use Subs Function
You have a period in the last line where you should have a comma. That is, "y1.z1" should be "y1,z1".

alrededor de 1 mes hace | 0

Respondida
Mean values of matrix elements corresponding to increment of fixed column values
A = [0 1; 3 2; 1 3; 7 4; 2 5; 11 6]; dx = [0.5:2:6.5]; dy = groupsummary(A(:,1),discretize(A(:,2),dx),'mean')

alrededor de 1 mes hace | 0

| aceptada

Respondida
plotting two types of data on one graph
% Initialize data (example setup) data = randi([1 2], 20, 1000); % Replace with your actual data data(rand(20, 1000) < 0.1) = ...

alrededor de 1 mes hace | 0

Respondida
Why the if loop are getting the exact values of the Kf_LMax values not the approximated values in the different phase of the Relative ligand Concentration?
prev_end = PhaseTimes(i - 1); That's the start of the previous phase, not the end of the previous phase. Using the previous ph...

alrededor de 1 mes hace | 0

| aceptada

Respondida
How to create a sequence of intervals
y=[2 -3 4 -1 6]; x=-4; intervalles=abs(x-y).*[-1;1]; Each column of intervalles contains one interval, accessed by ...

alrededor de 2 meses hace | 1

Respondida
set the tick format of y axis
set(gca().YAxis,'Exponent',-3)

alrededor de 2 meses hace | 0

Respondida
Non-integer value in for-loop
You can't use a number that's not a positive integer as an index, as in H(i) when i is 0 or 0.1, etc.. That's the problem. ...

alrededor de 2 meses hace | 0

Respondida
Create a figure with slider (before/after)
This File Exchange submission may be useful: <https://www.mathworks.com/matlabcentral/fileexchange/23073-uisplitpane-split-a-...

alrededor de 2 meses hace | 0

Respondida
Plot exceeding time limit due to large dataset
You can replace those ~80000 plotted red, green, and blue lines with 3 lines: one red, one green, and one blue. Use NaNs in the...

alrededor de 2 meses hace | 1

| aceptada

Respondida
Convert cell array of structures to numeric vector
ale{1}.a = 0; ale{2}.a = 1; ale{3}.a = 1.5 This will work for the given example: S = [ale{:}]; ale_vec = [S.a]

alrededor de 2 meses hace | 0

Respondida
For loop for different step size
M = [24 80; 24 80; 24 80; 24 80; 30 120; 30 120; 48 124; 48 124; 48 124]; [c,g] = groupcounts(M(:,2)) There are your y- and x-...

alrededor de 2 meses hace | 0

| aceptada

Respondida
How to perform matrix math
fn = dir('*.csv'); % this call returns info about .csv files in the current directory; % you may need to mod...

alrededor de 2 meses hace | 0

| aceptada

Respondida
I think, I might have a problem with the 'hold' part and I get the 'error while evaluating button privatebuttonpushedfcn'
You need to tell hold() and axis() to operate on your app's axes: ... hold(app.UIAxes,'on') ... hold(app.UIAxes,'o...

alrededor de 2 meses hace | 1

| aceptada

Cargar más