Respondida
user define dialog box or GUI
Easier and nicer might be mutually exclusive. If you want tips and examples about GUI design, I encourage you to check out this...

alrededor de 6 años hace | 1

| aceptada

Respondida
Function IMRESIZE expected input number 2, MAP, to be a valid colormap. Valid colormaps cannot have values outside the range [0,1].
The image you are reading is probably an RGB image, so the size function would then return 3 elements. size_ref=size(ref);size_...

alrededor de 6 años hace | 1

| aceptada

Respondida
How do I remove column x from all variables in my workspace?
Option n_by_Walter+1: A.a=[1,1,1,1;2,2,2,2;3,3,3,3]; A.b=[1,1,1,1;2,2,2,2;3,3,3,3]; A.c=[1,1,1,1;2,2,2,2;3,3,3,3]; A.d=[1,1,...

alrededor de 6 años hace | 1

| aceptada

Respondida
How to remove array elements after comparing it to another array?
The same you already had: time=xlsread('duom.xlsx', 'A3:A7040'); yaxis=xlsread('duom.xlsx','C3:C7040'); mask = time > 30 tim...

alrededor de 6 años hace | 1

| aceptada

Respondida
MATLAB for Windows 7 32-bit
You will have to use R2015b or older, since that is the last release with a 32 bit version.

alrededor de 6 años hace | 1

Respondida
need a date array
This is one of several options: t=datetime(2019,1,1,0,0,0):hours(1):datetime(2020,1,1,0,0,0);

alrededor de 6 años hace | 1

| aceptada

Respondida
Can't get this function to work. Nucleotides to amino acid function
You need to use | and & instead of || and && if you are dealing with arrays. For other suggestions to improve this function, se...

alrededor de 6 años hace | 1

Respondida
Writing a program to combine multiple arrays
You can use the square brackets to concatenate arrays, or you can use the cat function. [A;B;C] cat(3,A,B,C)

alrededor de 6 años hace | 1

Respondida
How can I pilot powerpoint from Matlab ?
There are two ways I know of, neither is simple: Use ActiveX (which will be removed from Matlab in a future release and will on...

alrededor de 6 años hace | 1

| aceptada

Respondida
caxis does not seem to be working...
You can use image, but you do need to make sure you are scaling your colors, instead of using the direct mapping. If you look at...

alrededor de 6 años hace | 1

Respondida
ERROR : The function 'pushbutton1_Callback' might be unused . AND any more
These are not errors, they are warnings given by mlint. Because the reference to these functions is hidden away in the .fig fil...

alrededor de 6 años hace | 1

| aceptada

Respondida
Defining persistent variables in a function
You can use use this: function fun() persistent x y z if isempty(x) x = % y = % z = % end %rest of your function e...

alrededor de 6 años hace | 1

| aceptada

Respondida
Matlab Functions and GUI
You have a recursive function that doesn't get anywhere: if fahrenheit(x,___). At that point the function calls itself. Before t...

alrededor de 6 años hace | 1

Respondida
Please help, how do I use the 'for' command in this situation?
Use logical indexing: V=zeros(size(x)); M=zeros(size(x)); L= 12<=x & x<=20; V(L)= ____%replace x with x(L) %etc

alrededor de 6 años hace | 1

Respondida
What is the meaning of '0' as an argument?
This usage goes back to when handles to objects were exposed to the user as doubles (pre-HG2, so <R2014b). Numbered figures were...

alrededor de 6 años hace | 1

| aceptada

Respondida
I want plot y = 1-exp(-x) for 3000 times(repeat 3000 times). The value x is the random number from [0,1]. Please use "rand"to get x and use "cdfplot" to get the y
Some general hints: The rand function produces a double array, not a cell array. You therefore don't need curly braces to selec...

alrededor de 6 años hace | 1

| aceptada

Respondida
Elseif does not work correctly
I suspect you are encountering the wondrous world of floating point values. Some decimal values do not have an exact binary equi...

alrededor de 6 años hace | 1

Respondida
Function Error / If and elseif statement help
As a replacement for what you have done here, I would suggest using ismember to find the triples that form valid codes. You can ...

alrededor de 6 años hace | 1

| aceptada

Respondida
Function definitions are not permitted in this context.
You put a line of code before the first function. You can only do that if you intend your file to work as a script, and if you c...

alrededor de 6 años hace | 0

Respondida
Compare two columns and if the values are same then replace one column values with another's.
You can use ismember to find the indices of the shared time points. If they are not exactly the same you can use ismembertol to ...

alrededor de 6 años hace | 1

| aceptada

Respondida
How do i stop my array changing after every iteration of my loop?
Replace width{1,i} with width{k,i}. Your code is also not loading the number of rooms for the inner loop.

alrededor de 6 años hace | 0

| aceptada

Respondida
GUI with addition, input must be a character vector or string scalar
No globals, no errors: h=struct; h.f=figure('position',[400 400 400 400]); h.opbox = uicontrol('style','edit','string','0','p...

alrededor de 6 años hace | 0

Respondida
Histogram of letters of a text
Once you have the text in a Matlab array it is stored as numbers, so you can use the normal tools. lorem='Lorem ipsum dolor sit...

alrededor de 6 años hace | 1

Respondida
How to generate permutation of matrix rows in a new matrix?
This doesn't result in the same order you write, but it gets the job done: X=[1 2; 3 4; 5 6]; ind=perms(1:size(X,1)); ind=ind...

alrededor de 6 años hace | 1

Respondida
I am receiving a "parse error" in this function. Can anyone help me?
You have a dot before the plus. Addition is always an element-wise operation, so you don't need a dot there.

alrededor de 6 años hace | 1

| aceptada

Respondida
How can I get the difference between two region triangle wise?
The code below is most of the way there. It only needs to have an encoding for the distance along the edge, so the line doesn't ...

alrededor de 6 años hace | 0

| aceptada

Respondida
A problem with floating point precision!
Don't compare to 0, but compare the absolute difference to a tolerance. a=1.12*100; b=fix(a); abs(a-b)<=eps(a) If you want t...

alrededor de 6 años hace | 1

| aceptada

Respondida
Creating a Matrix with for loop
This code should get you close to what you need. Adapt as needed. X =[2 1 2 10 3 0 0 0 0; 2 2 3 20 5 0 0 0 0]; z=[2 3]; ...

alrededor de 6 años hace | 0

| aceptada

Respondida
gui in matlab?
Callback functions ignore output variables. If you want to do something with a value outside of the callback you need to store i...

alrededor de 6 años hace | 0

| aceptada

Respondida
Trying to run a while loop that increases a number of "experiments" in a for loop
Have you tried using breakpoints? Then you know why it is such a bad idea to use clear all instead of just clear or clearvars. A...

alrededor de 6 años hace | 0

| aceptada

Cargar más