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

etwa 15 Jahre vor | 7

| akzeptiert

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

etwa 15 Jahre vor | 1

| akzeptiert

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

etwa 15 Jahre vor | 0

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

etwa 15 Jahre vor | 2

| akzeptiert

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

etwa 15 Jahre vor | 0

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

etwa 15 Jahre vor | 1

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

etwa 15 Jahre vor | 0

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

etwa 15 Jahre vor | 0

| akzeptiert

Beantwortet
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),... ...

etwa 15 Jahre vor | 0

| akzeptiert

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

etwa 15 Jahre vor | 0

| akzeptiert

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

etwa 15 Jahre vor | 0

Frage


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

etwa 15 Jahre vor | 2 Antworten | 4

2

Antworten

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

etwa 15 Jahre vor | 1

| akzeptiert

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

etwa 15 Jahre vor | 0

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

etwa 15 Jahre vor | 0

| akzeptiert

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

etwa 15 Jahre vor | 0

| akzeptiert

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

etwa 15 Jahre vor | 0

| akzeptiert

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

etwa 15 Jahre vor | 0

| akzeptiert

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

etwa 15 Jahre vor | 0

| akzeptiert

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

etwa 15 Jahre vor | 0

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

etwa 15 Jahre vor | 2

| akzeptiert

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

etwa 15 Jahre vor | 4

| akzeptiert

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

etwa 15 Jahre vor | 0

| akzeptiert

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

etwa 15 Jahre vor | 5

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

etwa 15 Jahre vor | 0

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

etwa 15 Jahre vor | 0

| akzeptiert

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

etwa 15 Jahre vor | 6

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

etwa 15 Jahre vor | 0

| akzeptiert

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

etwa 15 Jahre vor | 2

| akzeptiert

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

etwa 15 Jahre vor | 0

| akzeptiert

Mehr laden