回答済み
Set color to 'none' instead of white in 'heatmap'
Unfortunately 'none' is not a valid value for 'MissingDataColor', and I cannot find any way to set alpha values in heatmaps. Wo...

約6年 前 | 0

回答済み
(app designer) Callback for ROIMoved event does not work
Thomas, When setting up the listener, use addlistener(ROI, 'ROIMoved', @app.allevents) Then, when defining allevents, use fu...

約6年 前 | 5

| 採用済み

回答済み
Dimensional error while running the code from matlab documentation
This code should run without error in R2016b and later due to implicit expansion, as t is a row vector and [50 150 200]' is a co...

約6年 前 | 0

| 採用済み

回答済み
Merge cell that has common element
I'm not sure if this is the best way to do it, but I believe it will work. It starts by setting A_new to A. It then loops throu...

約6年 前 | 0

| 採用済み

回答済み
Generating arbitrary colored tick labels
Is TeX an option for you? n=10; plot(1:n); labels = cell(n,1); for i=1:n labels{i} = sprintf('\\color[rgb]{%f, %f, %f}%...

約6年 前 | 1

| 採用済み

回答済み
How to check whether a specific variable is empty or not in table type
T_data(~cellfun(@isempty, T.ls_max_tone),:) This will return a table containing only the rows where ls_max_tone is not empty.

約6年 前 | 0

| 採用済み

回答済み
There is no InnerPosition property on the matlab.graphics.layout.TiledChartLayout class.
It looks like a handful of properties for TiledChartLayout objects, including 'Position', 'InnerPosition', and 'OuterPosition', ...

約6年 前 | 1

回答済み
How to get linprog to not ignore x0 R2019a
This suggests the initial condition is ignored unless you use the active-set algorithm. This says active-set was removed for li...

約6年 前 | 0

回答済み
find elements which has minmum and maximum probability in an array
A = [ 1,2,3,4,5,6,7]; P = [ 0.01,0.01,0.25,0.2,0.25,0.09,0.19]; minprob = A(P==min(P)) maxprob = A(P==max(P)) minprob = ...

約6年 前 | 1

| 採用済み

回答済み
How can I make this code more efficient so it will run faster?
Since the order of the steps doesn't matter, how about this? X = [1000, 2500, 10000, 25000, 100000, 1000000]; for k = 1:length...

約6年 前 | 1

| 採用済み

回答済み
Conditional replacement of array values from another array
Do you need a loop? If you know there are exactly as many 500s in A as there are values in B: A(A==500) = B; If there may be ...

約6年 前 | 1

回答済み
find maximum value for each year in a 2 columns array
Try this: [G, y] = findgroups(input(:,1)); output = [y splitapply(@max, input(:,2), G)];

約6年 前 | 1

| 採用済み

回答済み
Create a vector from components of old vectors
For a matrix A such as A = rand(3,5); this should work: v = [A(1,:) A(:,3)']

約6年 前 | 1

| 採用済み

回答済み
print values in one matrix to another
Let me know if this works: length = [connectivity, zeros(total_elements, 4)]; for i = 1:total_elements length(i, [4 6]) =...

約6年 前 | 0

| 採用済み

回答済み
Outputting cell vectors that contain specific information help?
You can use the colon operator to generate a character vector containing each lower case letter in the alphabet: >> 'a':'z' an...

約6年 前 | 0

| 採用済み

回答済み
Matlab Code for the Gauss Legendre Quadrature
Have your vectors of weights be the same size as your vectors of locations, ordered so that corresponding weights and locations ...

約6年 前 | 2

| 採用済み

回答済み
how do i give the user the option to stop making an input? while loops program.
Check the value of grade immediately after the user inputs it, and only update count and x if the loop should continue: x = [];...

約6年 前 | 0

回答済み
8 digit double array to 1 digit double array
How about H_conv = num2str(H)-'0'

約6年 前 | 0

回答済み
index exceeds the number of array
Ah, ok. You flip between treating S1 as a vector containing the different stock prices (which it is in your new code) and as a s...

約6年 前 | 0

| 採用済み

回答済み
(Strain vs Stress Curve) to (Stress Vs Strain Curve) Switch My X-axis into Y-axis in my plot
plot (strain.normal,length(strain.normal),'b'); In this line, length(strain.normal) is a scalar, so nothing is plotted, simil...

約6年 前 | 1

| 採用済み

回答済み
Trying to extract numbers between bounds and counting them
Currently, your for loop only runs once, during which time k is equal to the entirety of x. By using for k = x(:,1)' or just ...

約6年 前 | 0

回答済み
multiple linear regression check
All of the loops can be avoided. If you have something like b=1:10; for i=1:numel(b) a(i)=2*b(i)+3; end you can always ...

約6年 前 | 0

| 採用済み

回答済み
Formating a table with unequal rows
How about this? load('matlab.mat'); C = unique([OutnbEmployees1.AlgPhrase; OutnbEmployees2.IrqPhrase; OutnbEmployees3.TunPhras...

約6年 前 | 0

回答済み
Modifying a Row Vector to Pair up Numbers
How about this? S1 = [ 4, 6, 3, 5, 1 ]; S2 = [ 3, 3, 1 ]; S3 = [ 2, 4, 7, 1 ]; C = {S1,S2,S3}; C2 = cellfun(@(s) 10*s(1:end-1...

約6年 前 | 0

回答済み
Joining a column from one table to another by id
If you know each ID in A is included in B exactly once, I believe this should work: A = [A rowfun(@(rn) B.N(strcmp(B.ID,rn)), A...

約6年 前 | 0

回答済み
How to change certain values of a column in a table depending on a certain time range ?
Try this: totalaggregated{TR,{'Total'}} = 0.75*totalaggregated{TR,{'Total'}};

約6年 前 | 0

| 採用済み

回答済み
Always show the error Function definitions in a script must appear at the end of the file.
When you create a script in MATLAB, all function definitions need to be at the end of the file. function Dp=fun1(t,p) y=p(1);z...

約6年 前 | 0

回答済み
Find repeated pairs of two variables
How about this? % examples weight = randi([70 74], 10, 1); height = randi([5 7], 10, 1); [~,i] = unique(findgroups(height,...

約6年 前 | 0

| 採用済み

回答済み
Invalid use of operator. "*"
Make sure the period is adjacent to the asterisk: y = cos(20*x).* exp(x.^2);

約6年 前 | 2

| 採用済み

回答済み
How to set UIAxes min and max lim for plot in app designer ?
Use ylim(ax, [minlim,maxlim]) instead.

約6年 前 | 0

さらに読み込む