Réponse apportée
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...

presque 6 ans il y a | 0

Réponse apportée
(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...

presque 6 ans il y a | 5

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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}%...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
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.

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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', ...

presque 6 ans il y a | 1

Réponse apportée
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...

presque 6 ans il y a | 0

Réponse apportée
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 = ...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
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 ...

presque 6 ans il y a | 1

Réponse apportée
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)];

presque 6 ans il y a | 1

| A accepté

Réponse apportée
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)']

presque 6 ans il y a | 1

| A accepté

Réponse apportée
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]) =...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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 ...

presque 6 ans il y a | 2

| A accepté

Réponse apportée
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 = [];...

presque 6 ans il y a | 0

Réponse apportée
8 digit double array to 1 digit double array
How about H_conv = num2str(H)-'0'

presque 6 ans il y a | 0

Réponse apportée
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...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
(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...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
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 ...

presque 6 ans il y a | 0

Réponse apportée
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 ...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Formating a table with unequal rows
How about this? load('matlab.mat'); C = unique([OutnbEmployees1.AlgPhrase; OutnbEmployees2.IrqPhrase; OutnbEmployees3.TunPhras...

presque 6 ans il y a | 0

Réponse apportée
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...

presque 6 ans il y a | 0

Réponse apportée
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...

presque 6 ans il y a | 0

Réponse apportée
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'}};

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

Réponse apportée
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,...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Invalid use of operator. "*"
Make sure the period is adjacent to the asterisk: y = cos(20*x).* exp(x.^2);

presque 6 ans il y a | 2

| A accepté

Réponse apportée
How to set UIAxes min and max lim for plot in app designer ?
Use ylim(ax, [minlim,maxlim]) instead.

presque 6 ans il y a | 0

Charger plus