답변 있음
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

더 보기