Domanda


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...

quasi 8 anni fa | 3 risposte | 7

3

risposte

Risposto
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...

quasi 8 anni fa | 1

| accettato

Risposto
[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...

quasi 8 anni fa | 0

Risposto
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...

quasi 8 anni fa | 3

| accettato

Risposto
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...

quasi 8 anni fa | 0

| accettato

Risposto
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...

quasi 8 anni fa | 0

Risposto
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 ...

quasi 8 anni fa | 0

| accettato

Risposto
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...

quasi 8 anni fa | 0

| accettato

Risposto
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 ...

quasi 8 anni fa | 0

Risposto
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...

quasi 8 anni fa | 0

Risposto
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...

quasi 8 anni fa | 0

Risposto
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...

quasi 8 anni fa | 0

| accettato

Risposto
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...

quasi 8 anni fa | 0

| accettato

Risposto
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)=...

quasi 8 anni fa | 0

| accettato

Risposto
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...

quasi 8 anni fa | 0

| accettato

Risposto
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|...

quasi 8 anni fa | 0

| accettato

Risposto
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...

quasi 8 anni fa | 0

Risposto
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...

quasi 8 anni fa | 0

| accettato

Risposto
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) ...

quasi 8 anni fa | 1

| accettato

Risposto
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...

quasi 8 anni fa | 2

| accettato

Risposto
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...

quasi 8 anni fa | 1

| accettato

Risposto
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...

quasi 8 anni fa | 2

Risposto
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...

quasi 8 anni fa | 1

| accettato

Risposto
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...

quasi 8 anni fa | 1

| accettato

Risposto
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...

quasi 8 anni fa | 1

Risposto
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...

quasi 8 anni fa | 0

| accettato

Risposto
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)];

quasi 8 anni fa | 0

| accettato

Risposto
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 ...

quasi 8 anni fa | 0

| accettato

Risposto
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...

quasi 8 anni fa | 0

Risposto
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 ...

quasi 8 anni fa | 2

| accettato

Carica altro