回答済み
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...

約6年 前 | 1

| 採用済み

回答済み
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_...

約6年 前 | 1

| 採用済み

回答済み
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,...

約6年 前 | 1

| 採用済み

回答済み
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...

約6年 前 | 1

| 採用済み

回答済み
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.

約6年 前 | 1

回答済み
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);

6年以上 前 | 1

| 採用済み

回答済み
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...

6年以上 前 | 1

回答済み
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)

6年以上 前 | 1

回答済み
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...

6年以上 前 | 1

| 採用済み

回答済み
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...

6年以上 前 | 1

回答済み
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...

6年以上 前 | 1

| 採用済み

回答済み
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...

6年以上 前 | 1

| 採用済み

回答済み
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...

6年以上 前 | 1

回答済み
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

6年以上 前 | 1

回答済み
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...

6年以上 前 | 1

| 採用済み

回答済み
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...

6年以上 前 | 1

| 採用済み

回答済み
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...

6年以上 前 | 1

回答済み
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 ...

6年以上 前 | 1

| 採用済み

回答済み
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...

6年以上 前 | 0

回答済み
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 ...

6年以上 前 | 1

| 採用済み

回答済み
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.

6年以上 前 | 0

| 採用済み

回答済み
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...

6年以上 前 | 0

回答済み
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...

6年以上 前 | 1

回答済み
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...

6年以上 前 | 1

回答済み
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.

6年以上 前 | 1

| 採用済み

回答済み
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 ...

6年以上 前 | 0

| 採用済み

回答済み
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...

6年以上 前 | 1

| 採用済み

回答済み
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]; ...

6年以上 前 | 0

| 採用済み

回答済み
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...

6年以上 前 | 0

| 採用済み

回答済み
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...

6年以上 前 | 0

| 採用済み

さらに読み込む