Respondida
Convert array to argument list?
B = [77 34 56] B = mat2cell(B,1,ones(1,numel(B))) func(B{:}) If your B has a different shape, you will have to adjust...

alrededor de 15 años hace | 7

| aceptada

Respondida
How can I make a .p file from a .fig and .m file of my GUI?
If you want one stand alone file, do this: # Open the GUI in GUIDE # Choose: File > Export # Pick a name for an M-file, sa...

alrededor de 15 años hace | 1

| aceptada

Respondida
How to save a GUI In Way that you can run it from another PCs?
I don't understand what you mean "it can only be run by opening GUIDE." That is not correct, unless there is something wrong....

alrededor de 15 años hace | 0

Respondida
How to write a basic loop
Your question is confusing because you say you want to solve for a range of x and y values but you are looping over z values. C...

alrededor de 15 años hace | 2

| aceptada

Respondida
Numbered Patches
It could be automated, something like: xdata = [2 2 0 2 5; 2 8 2 4 5; 8 8 2 4 8]; ydata = [4 4 4 2 0;...

alrededor de 15 años hace | 0

Respondida
Default plot apperance... how do I change it??
In your startup file, put the defaults. set(0,'defaultfigurecolor',[1,1,1]) set(0,'defaultaxescolor',[1 1 1]) ...etc I...

alrededor de 15 años hace | 1

Respondida
Need some help on this task.
MATLAB Answers is a place you can get help from the user community on specific MATLAB questions. It is not intended as a place t...

alrededor de 15 años hace | 0

Respondida
superimposing plots.
Why not use SUBPLOT? subplot(1,2,1) stem(y,z) supbplot(1,2,2) semilogx(f,x) By the way, a figure is the window ...

alrededor de 15 años hace | 0

| aceptada

Respondida
SUbstitions
M = @(csi) [1, csi(1), csi(2), csi(3), csi(4), csi(1)^2 - 1,... csi(1)*csi(2), csi(1)*csi(3), csi(1)*csi(4),... ...

alrededor de 15 años hace | 0

| aceptada

Respondida
plotting griddata
From the doc: x = rand(100,1)*4-2; y = rand(100,1)*4-2; z = x.*exp(-x.^2-y.^2); ti = -2:.25:2; [XI,YI] = meshgrid(...

alrededor de 15 años hace | 0

| aceptada

Respondida
On-Screen Keyboard
I am not sue of your question either. Here is the basic layout of a custom GUI keyboard that I made for a client. Notice that ...

alrededor de 15 años hace | 0

Pregunta


Hump-day puzzler - Unknown Function
My colleague was working with MATLAB and defined an anonymous function F. When he saw me come in he typed clc, hit return than ...

alrededor de 15 años hace | 2 respuestas | 4

2

respuestas

Respondida
Converting Cell to Matrix to use Max Function
MYCELL = {magic(3) magic(5) magic(6)} mx = cellfun(@(x) max(x(:)),MYCELL) mx has the maximum element for each individual ce...

alrededor de 15 años hace | 1

| aceptada

Respondida
Figure settings
This function lets you select the lines with the mouse and change the color, linewidth, marker, markersize, etc. Look at the pr...

alrededor de 15 años hace | 0

Respondida
switch case syntax need
Why would you want to do this with a SWITCH instead of an IF-ELSEIF structure? N = 131; switch ((N>=10 && N<=100) + 2...

alrededor de 15 años hace | 0

| aceptada

Respondida
Deleting zeros lines in a general matrix
A = rand(10,3)>.8 % Should have some zero rows. A = A(any(A,2),:) % Take only the rows with a non-zero Another way to do ...

alrededor de 15 años hace | 0

| aceptada

Respondida
Trouble with fprintf...
You still need FOPEN. UIPUTFILE only gets the name and location for you, which you could use with FOPEN. fid = fopen(ful...

alrededor de 15 años hace | 0

| aceptada

Respondida
combining multiple open figures into 1
See the example given in the accepted answer to <http://www.mathworks.com/matlabcentral/answers/7978-put-figures-fig-in-one-page...

alrededor de 15 años hace | 0

| aceptada

Respondida
change number of sig figs in a list of numbers
N = 734504.0749692708 Ns = round(N*100)/100 *EDIT* Addressing Oleg's concern... The above keeps two significant decimals...

alrededor de 15 años hace | 0

| aceptada

Respondida
how to set 1000 separator for large numbers in GUI MATLAB
Another alternative. H = '123456.09'; % A string number. S = regexp(H,'\.','split'); S{1} = fliplr(regexprep(fliplr(S{1}...

alrededor de 15 años hace | 0

Respondida
Parent patch to figure, not axes
If your goal is just not to see the axes, you could do this: set(gca,'visible','off') A patch object cannot be the child o...

alrededor de 15 años hace | 2

| aceptada

Respondida
Warning: Integer operands are required for colon operator when used as index
This is caused by something like: T = rand(1,10); T(2.2:7.99) % Note the indexing by: 2.2:7.99 So you need to look thro...

alrededor de 15 años hace | 4

| aceptada

Respondida
Optimization of 2 matrices
Here is one way to get the permutations: A = [1 2 3]; B = [4 5 6]; P = perms(1:3); for ii = 1:size(P,1) pairin...

alrededor de 15 años hace | 0

| aceptada

Respondida
How do I write a good answer for MATLAB Answers?
Keep it civil. * Even though it may be tempting to write a put-down or overly sarcastic remark, don't. * * Links to insulting ...

alrededor de 15 años hace | 5

Respondida
matrix addition is problemtic in finding similaity between projects
You are trying to add arrays with different sizes. * a{m} is 1-by-3 * x{j} is 1-by-15 * y{z} is 1-by-3 You must have m...

alrededor de 15 años hace | 0

Respondida
Function - str2func gives unusual error
What version of MATLAB are you using? As a workaround, this will produce your desired results. Instead of: pdefun=str2func...

alrededor de 15 años hace | 0

| aceptada

Respondida
Best way(s) to master MATLAB?
In addition to the recommendation of others: I highly recommend the book, " <http://www.amazon.com/gp/offer-listing/013143018...

alrededor de 15 años hace | 6

Respondida
Looping through two matrices with IF statement
Your code is doing exactly what you describe that it should do, that is it: "looks at M(:,1) and put ones in each row of A (for...

alrededor de 15 años hace | 0

| aceptada

Respondida
Data Cursor Position in GUI
Add this line to your myupdatefcn: set(0,'userdata',pos); Then from any workspace you can do: pos = get(0,'userda...

alrededor de 15 años hace | 2

| aceptada

Respondida
Put figures (.fig) in one page
Before you do anything, save each of your four figures as a MATLAB figure so your figures aren't lost! Once you do that, clos...

alrededor de 15 años hace | 0

| aceptada

Cargar más