Réponse apportée
Switch and Case using radio buttons
The tag is a string (technically a char vector). Include the quotes. case 'b1' and case 'b2'

presque 5 ans il y a | 0

| A accepté

Réponse apportée
how to Expand the plot line in a function
The default x interval for fplot is [-5 5]. You can change it with the xinterval argument: fplot(y,[0,130]) You don't need an ...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
renaming a variable, or creating a dynamic variable name
If the cells are really holding Matlab tables, you could assign the sampleNames as table Descriptions: for idx = 1:n data{...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Cannot install matlab on ubuntu 18.04
Try: xhost +SI:localuser:root sudo ./install https://www.mathworks.com/matlabcentral/answers/518584-how-do-i-install-on-ubunt...

presque 5 ans il y a | 15

| A accepté

Réponse apportée
Extraction of non zero rows from a matrix
A = [magic(3);zeros(1,3)] svp = A~=0 extracted = reshape(A(svp),[],3) If there is a possibiity of finding zeros in a nonzerow...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Replace negative values with zero and values above 1 with 1, using loop in a 8760 x 1000 matrix
Is there a reason you want to do it in a loop? Matlab excels at vectorized operations. The following is simpler and faster than...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Formatting the fit function
epsilon = (0:0.2:5)'; load = 2*exp(-0.2*epsilon) + 0.5*randn(size(epsilon)); fitting = fit(epsilon, load, 'poly2'); plots = p...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Plotting a contour of a function with one input variable
exes = linspace(-2*pi,2*pi); whys = exes; theta = [exes',whys']; takeOneInput(theta) You can pack as much as you want into a...

presque 5 ans il y a | 0

Réponse apportée
How exactly does the gradient function work when applying it to an image?
If you type open gradient, in the Command window, the relevant code is: % Take forward differences on left and right edges if ...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Merging row elements into single numbers
Edit: Use Star Strider's answer. It's faster. C = [3 4 5 6 7 9 1 5 8] C = double(string(C).join(''))

presque 5 ans il y a | 1

| A accepté

Réponse apportée
How to get cell string array data and combine it as a 1 column only?
I'm going to guess you want a 1440x61 string array. stringArray = [replika_fix_menitan{:}] would give you the array. The {:} r...

presque 5 ans il y a | 0

Réponse apportée
Why do writematrix et. al. have unexpected behavoir, e.g. they alter Excel formatting?
Please see this related link: https://www.mathworks.com/matlabcentral/answers/676588-writematrix-resizing-column-widths#answer_...

presque 5 ans il y a | 1

| A accepté

Réponse apportée
Mathlab Instalattion problem error
You will probably get better help creating a service request directly with MathWorks. https://www.mathworks.com/support/contact...

presque 5 ans il y a | 0

Réponse apportée
How to make a code more interactive (command window)?
disp("1 - spin") disp("2 - tumbling") disp("3 - three axis stab") ftype = input("Select function type by number: "); switch ...

presque 5 ans il y a | 1

| A accepté

Réponse apportée
range isn't working
Yep, I don't think it's part of base Matlab. It works as you would expect if you install the Statistics and Machine Learning Too...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Need to make surf plot in ode45
options = odeset('RelTol',1e-6,'Stats','on'); %initial conditions Xo = [0.5;0.7;2]; % Choose parameters t and a? t...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Contour Graph/Plot displays edgy function
phi goes to +/- infinity near the origin. x = -10:1:10; y = -10:1:10; [X,Y] = meshgrid(x,y); mu = 0.001; phi = mu*(X./(X.^2...

presque 5 ans il y a | 0

Réponse apportée
How to convert number to text in thousand format?
See: https://www.mathworks.com/matlabcentral/answers/96131-is-there-a-format-in-matlab-to-display-numbers-such-that-commas-are...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Find index for a coordinate pair in cell array
detectedAsTrack = 0; detectedTracksList = []; idxs = xStates{curScan,1}(1,:)==xloc > 0 & xStates{curScan,1}(2,:)==yloc; if ...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Finding the first instance of a value in an array
A = magic(5) for idx = 1:size(A,1) test = find(A(idx,:)>22,1); if isempty(test) test = 0; end coli...

presque 5 ans il y a | 0

Réponse apportée
what is the equivalent script to TWISTER('state')
Yes, s.State for the default rng should be equivalent to S. The values in the state are used in the Twister algorithm to genera...

presque 5 ans il y a | 0

Réponse apportée
How can I plot multiple matlab saved figures into one
I would recommend saving the data and then producing the images on the tiledlayout, but... % Open the figures open('short1.fig...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
How do I get the plot in my for loop to retain previous plots?
You are regenerating the figure and axes every time the if condition triggers. About the only thing you need inside the if is th...

presque 5 ans il y a | 1

| A accepté

Réponse apportée
MATLAB computations on variables?
The symbolic toolbox is great for stuff like this. https://www.mathworks.com/help/symbolic/symbolic-computations-in-matlab.html...

presque 5 ans il y a | 0

Réponse apportée
How to restart my program from a try/catch statment
With recursion, you could do something like this: val = 1; startThisAgain(val) function startThisAgain(val) disp('Be...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
I am getting error
In addition to dots in front of carets ( .^ ) and slashes ( ./ ), you need dots in front of the asterisks ( .* ) for elementwise...

presque 5 ans il y a | 0

Réponse apportée
How to prevent axis off from removing the subtitle?
img = imread('cameraman.tif'); figure; tiledlayout(1,1) imagesc(img); title('A'); subtitle('B'); axis off tiledlayout req...

presque 5 ans il y a | 1

Réponse apportée
13x8 Matrix Cubic Interpolation
Like this? V = [0.0000 0.0000 0.0000 0.0000 0.0000 0.0890 0.2860 0.4380; 0.0177 0.0648 0.0888 0.1070 0.1640 0.3680 0.5720 0.70...

presque 5 ans il y a | 1

| A accepté

Réponse apportée
does not plot the normal distribution. Writes Unrecognized function or variable 'O'. What is the reason?
app.O is a property that needs to be declared in a properties block before it can be used. Since it's not declared, an error is...

presque 5 ans il y a | 0

Réponse apportée
how to search specific data from matlab in excel
The last line is looking for a string 'T' in the first column of the table. You want to search for the variable T (no quotes). T...

presque 5 ans il y a | 0

| A accepté

Charger plus