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

circa 6 anni fa | 1

| accettato

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

circa 6 anni fa | 1

| accettato

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

circa 6 anni fa | 1

| accettato

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

circa 6 anni fa | 1

| accettato

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

circa 6 anni fa | 1

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

circa 6 anni fa | 1

| accettato

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

circa 6 anni fa | 1

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

circa 6 anni fa | 1

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

circa 6 anni fa | 1

| accettato

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

circa 6 anni fa | 1

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

circa 6 anni fa | 1

| accettato

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

circa 6 anni fa | 1

| accettato

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

circa 6 anni fa | 1

Risposto
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

circa 6 anni fa | 1

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

circa 6 anni fa | 1

| accettato

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

circa 6 anni fa | 1

| accettato

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

circa 6 anni fa | 1

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

circa 6 anni fa | 1

| accettato

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

circa 6 anni fa | 0

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

circa 6 anni fa | 1

| accettato

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

circa 6 anni fa | 0

| accettato

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

circa 6 anni fa | 0

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

circa 6 anni fa | 1

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

circa 6 anni fa | 1

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

circa 6 anni fa | 1

| accettato

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

circa 6 anni fa | 0

| accettato

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

circa 6 anni fa | 1

| accettato

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

circa 6 anni fa | 0

| accettato

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

circa 6 anni fa | 0

| accettato

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

circa 6 anni fa | 0

| accettato

Carica altro