Pregunta


A guide to flag or close questions
_(My goal for this question is twofold: to have a guideline for if/when to flag or close a question, (to refer users who are not...

casi 8 años hace | 3 respuestas | 7

3

respuestas

Respondida
No MATLAB editor window opening
This looks like a Windows issue, not a Matlab issue. You can try to force Windows to reset window positions by changing your res...

casi 8 años hace | 1

| aceptada

Respondida
[DISCONTINUED] MATLAB Answers Wish-list #4 (and bug reports)
Many websites have a mechanism for this already, but Matlab Answers doesn't yet: a soft-close. Sometimes questions attract 'a...

casi 8 años hace | 0

Respondida
How do I enforce typing of my functions and function arguments?
Matlab is not a <https://en.wikipedia.org/wiki/Strong_and_weak_typing strongly typed> language, which can be very useful in some...

casi 8 años hace | 3

| aceptada

Respondida
Rotated Slices of 3D volumes
You can use |round| on the output data, although I don't see where your data would have the values you mention. The code below s...

casi 8 años hace | 0

| aceptada

Respondida
How to convert Python code into matlab
<http://stackoverflow.com/questions/1707780/call-python-function-from-matlab See this>, or with |system('python python_script.py...

casi 8 años hace | 0

Respondida
How can I plot this loop?
There are better ways to do this, but without re-writing a sizable chunk of your code that's a bit difficult. So in the example ...

casi 8 años hace | 0

| aceptada

Respondida
how to construct histogram with certain bin size?
If you want strange bins, you'll have to do some work yourself (I changed the number generation btw). The labels are also not to...

casi 8 años hace | 0

| aceptada

Respondida
Why system function block the timer function in matlab R2018a, but not in R2014a?
I just ran it on a few releases, and it seems R2015a doesn't block callback execution with |system| calls, and R2016a does. For ...

casi 8 años hace | 0

Respondida
Subtraction Two images in a GUI
A GUI in Matlab is nothing special: just a figure with some |axes| objects (which you can even generate with |subplot| if you li...

casi 8 años hace | 0

Respondida
Rewrite an input in a function in a for loop for one of the outputs from the same function in each iteration.
This uses the |percent_new| calculated in the previous loop in the next iteration (so |x_weight_SS| on iteration |i| is |percent...

casi 8 años hace | 0

Respondida
I am having problems saving the result of a for loop to a new array
You can modify your loop slightly to save it a bit differently to your matrix. Be careful with using |i| as loop index: it can c...

casi 8 años hace | 0

| aceptada

Respondida
keypress callback in figure
As far as I know you can't. Interactive tools like |pan| and |rotate3d| block most of the callbacks (you can't even set them whe...

casi 8 años hace | 0

| aceptada

Respondida
Changing the size of Vector (n no. of zeros to one zero and n no. of ones to 1)
This code should work to remove duplicate values. A=[1 1 0 0 1 1 1 0 1 0 1]; %A=randi([0 1],1,100); d=[false diff(A)=...

casi 8 años hace | 0

| aceptada

Respondida
probability distribution from a simple vector
Use meshgrid to generate all combinations and loop through them to count all occurrences. To convert to probability, divide by t...

casi 8 años hace | 0

| aceptada

Respondida
I have no experience with GUI. With Malab R2018a (App Designer) I would like to code a simple GUI, which adds two numbers. How can i display the result in an edit field?
You need to get the |String| property, convert form |char| to a numeric, compute the sum, convert to |char| and set the |String|...

casi 8 años hace | 0

| aceptada

Respondida
I wrote a program that can determine the subgroups of positive integers and their generators, can someone help me write the same code in gui?
A GUI isn't anything special in Matlab, it is just a figure with some |uicontrol| elements that have Callback functions. You can...

casi 8 años hace | 0

Respondida
How to populate a cell in a cell array with an array
The reason for this error is the way cells work: you can access the contents with curly brackets, or the cell as a container wit...

casi 8 años hace | 0

| aceptada

Respondida
How to convert single column RGB matrix to image
If your code works, but you need a 90 degree rotation (clockwise), you can use the anonymous function below: rot90CW=@(IM) ...

casi 8 años hace | 1

| aceptada

Respondida
Can someone explain to me what query points mean ?
The query points are the points where you want to know the value. You can also have a look at the examples that are given in the...

casi 8 años hace | 2

| aceptada

Respondida
How to copy a selective list of files, 'b', 'c' and 'd', from folder A to the folders 'B', 'C' and 'D' respectively.
If you have the list of files and target folders, you can use the <https://www.mathworks.com/help/releases/R2018a/matlab/ref/cop...

casi 8 años hace | 1

| aceptada

Respondida
what is the single command?????????
First generate all combinations, and then select 100 from them: total_row_length=12; number_of_zeros=5; selected_numb...

casi 8 años hace | 2

Respondida
How can I find the length of a cell array in a particular dimension excluding 0x0 doubles?
You can use ~cellfun('isempty',examplecell) to find out if cells are non-empty, and then you can use sum (specifying a dimension...

casi 8 años hace | 1

| aceptada

Respondida
Help using Microsoft Paint with Matlab code
# Save the image to a lossless image file (like e.g. png). # use |system(sprintf('mspaint "%s"',path_and_file))| # use a |msgb...

casi 8 años hace | 1

| aceptada

Respondida
How do I make a random matrix with specific parameters of what numbers, how many of each, and what can be associated with other values?
The only actual random generation is in your first column, the rest is just processing. If you need help on that, just post a co...

casi 8 años hace | 1

Respondida
Polar plot 0-180 degree with given data
Today's lesson: never assume, but RTM. Because you mentioned 180 degrees, I assumed you had checked the doc to see if Matlab use...

casi 8 años hace | 0

| aceptada

Respondida
Hi ! everyone , I want to write this matrix in matlab m.file!!
I suspect this is what you need: C1=[zeros(p-m,n-p) eye(p-m)];

casi 8 años hace | 0

| aceptada

Respondida
could anyone help me how to reduce the circshift to half of it.
Just change the for-loop header: A_master=1:12; for k=1:2:numel(A_master)%[1 3 5 7 9 11] for 12, [1 3 5] for 6, etc ...

casi 8 años hace | 0

| aceptada

Respondida
Can I add a new license to any version of MATLAB?
The only way to know for sure is to wait for the official answer from support, but speaking from my own experience (with a Stude...

casi 8 años hace | 0

Respondida
Unexpected result from linspace function
Welcome to the wondrous world of floating point numbers. Matlab is a computer program, so it works with binary. Some values are ...

casi 8 años hace | 2

| aceptada

Cargar más