Réponse apportée
Respond to text commands in command window without prompting for it
I have two suggestions: I don't really see how you would put that functionality in a CLI, so I'm going to suggest another rou...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
replace multiple characters in a string with different characters
If you want to follow OCDER's advice, I would go for option 3. Using |strrep| in a loop is of course slower, but it allows much ...

environ 8 ans il y a | 0

Réponse apportée
replace multiple characters in a string with different characters
You can enter cellstring inputs: >>line = 'I am ready to use MATLAB'; >>replaced = regexprep(line,{'r','u'},{'!','%'}); ...

environ 8 ans il y a | 3

Réponse apportée
Find a nearest points in the matrix with a specific different value
Unless |n| is much bigger than 1e6, I would first calculate the outcome distance for each point and then take 1e6 samples from t...

environ 8 ans il y a | 0

Réponse apportée
Hi, i am here to complete my project on a MATLAB GUI, but I have some syntax errors. Help me out.
|ginput| returns a decimal value, which you cannot use as indices. Use |round| to round your coordinates to integer values.

environ 8 ans il y a | 0

| A accepté

Réponse apportée
horizaontal lines in plots in a defined date
The code below should work for you. If it does not, please paste all red error text in a comment. t_special=[datetime(2016,...

environ 8 ans il y a | 0

Réponse apportée
Plotting two adjacent y-value pairs with respect to the same x value
By now there might be documented method, but you can use the <https://undocumentedmatlab.com/blog/undocumented-scatter-plot-jitt...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
I am having problem with input.
You learned a valuable lesson: don't shadow Matlab functions. You should write functions (or scripts) with names like |sum| or |...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
How can I find the value in matrix
The code below should do it. M=[NaN 23 37 53 53 14 0.2998 0.4497 0.0996 0.2495 23 0.20...

environ 8 ans il y a | 1

| A accepté

Réponse apportée
Can I apply imtranslate to a 4D image?
The code below implements what I mentioned in my comment. It might also be the case that your 4D is actually a 3D in the same fo...

environ 8 ans il y a | 1

| A accepté

Réponse apportée
bsxfun(minus) vs normal minus
Have you read the documentation of <https://www.mathworks.com/help/matlab/ref/bsxfun.html |bsxfun|>? Input arrays, specifie...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
How to randomly generate one non-zero element of each row from a matrix
There's probably a faster way, but the code below should work. A=[1 5 6 7 0; 2 0 0 4 2; 0 0 3 4 0]; A_cell=cellfun(@(x) ...

environ 8 ans il y a | 0

Réponse apportée
Convert any datetime to english datetime
How about this? date=datetime(file.datenum,'ConvertFrom','datenum');

environ 8 ans il y a | 3

| A accepté

Réponse apportée
Is there any way to find it?
You can load the variables into a struct with the following syntax s=load('yourfile.mat'); Then you can get the variable...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
Tiff library to export Tiff image uint32
I generated an example with the line below A=uint32(randi(uint32(inf),255,255)); Then, running your code resulted in thi...

environ 8 ans il y a | 0

Réponse apportée
Store result of three nested for loops
You could also use <https://www.mathworks.com/help/matlab/ref/ndgrid.html |ndgrid|> to generate all combinations of loop paramet...

environ 8 ans il y a | 0

Réponse apportée
[DISCONTINUED] MATLAB Answers Wish-list #4 (and bug reports)
Maybe it would be a good idea to ask for a confirmation before allowing users to answer their own question. Many people mistaken...

environ 8 ans il y a | 5

Réponse apportée
How can i call class from a function?
You should really have a look at the documentation of how you write classes in Matlab, starting for example <https://www.mathwor...

environ 8 ans il y a | 1

| A accepté

Réponse apportée
Problem plotting function in GUI
Using the handles struct is very easy. It may seem hard to learn good practices, but it is much harder to unlearn bad practices....

environ 8 ans il y a | 0

Réponse apportée
Find closest value to a constant in a multidimensional array column wise
The method I used below is to separate the parts the array you want to test from the rest of the array. As you can see in the |d...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
Accessing cell array data every 2 columns and concatenating them
Easy with |cellfun|: %generate random data: A=cell(3,6);x=[137 134 410 411 439 455]; for r=1:size(A,1) for c=1...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
Can I buy Antenna toolbox for Matlab Home?
<https://www.mathworks.com/store/link/products/home/ML Yes.>

environ 8 ans il y a | 0

Réponse apportée
Code execution in GUI
What you could do is something like the following: f=figure(1);clf(1) handles=struct('f',f,'interuptor',true,'counter',0...

environ 8 ans il y a | 1

Réponse apportée
Plot Legend Not Correct
You can use the output of the plot function to get the handles to the objects. Then you can use the list as an input to |legend|...

environ 8 ans il y a | 1

Réponse apportée
How do i calculate FWHM from Gaussian fitted curve??
More generally, the FWHM is the x-distance that describe the width of your curve halfway from the maximum to the baseline. Your ...

environ 8 ans il y a | 3

Réponse apportée
Apply an array to an equations variable?
Make sure your multiplications are element-wise (and your divisions) by including the dot before your product sign and your divi...

environ 8 ans il y a | 0

Réponse apportée
How can i use the GUIDE to create an interface to an existing program?
I would suggest you don't use GUIDE, but instead write the creating code yourself. My small guide to avoid GUIDE: * Make a fi...

environ 8 ans il y a | 2

Réponse apportée
error. unable to understand error. can you please look at it?
The problem is in the |e(j) = r'*(A);| line. You can double-check the involved values by using the debugger with the breakpoints...

environ 8 ans il y a | 0

Réponse apportée
Find i,j of non-sorted points
There are probably faster/better ways, but this code should do. I commented out two figures that are worthwhile at the explorato...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
[DISCONTINUED] MATLAB Answers Wish-list #4 (and bug reports)
Not really MATLAB Answers wish, but because the FEX is often mentioned/linked here: Some notification if an entry uses functi...

environ 8 ans il y a | 1

Charger plus