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

circa 15 anni fa | 7

| accettato

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

circa 15 anni fa | 1

| accettato

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

circa 15 anni fa | 0

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

circa 15 anni fa | 2

| accettato

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

circa 15 anni fa | 0

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

circa 15 anni fa | 1

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

circa 15 anni fa | 0

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

circa 15 anni fa | 0

| accettato

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

circa 15 anni fa | 0

| accettato

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

circa 15 anni fa | 0

| accettato

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

circa 15 anni fa | 0

Domanda


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

circa 15 anni fa | 2 risposte | 4

2

risposte

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

circa 15 anni fa | 1

| accettato

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

circa 15 anni fa | 0

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

circa 15 anni fa | 0

| accettato

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

circa 15 anni fa | 0

| accettato

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

circa 15 anni fa | 0

| accettato

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

circa 15 anni fa | 0

| accettato

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

circa 15 anni fa | 0

| accettato

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

circa 15 anni fa | 0

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

circa 15 anni fa | 2

| accettato

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

circa 15 anni fa | 4

| accettato

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

circa 15 anni fa | 0

| accettato

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

circa 15 anni fa | 5

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

circa 15 anni fa | 0

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

circa 15 anni fa | 0

| accettato

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

circa 15 anni fa | 6

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

circa 15 anni fa | 0

| accettato

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

circa 15 anni fa | 2

| accettato

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

circa 15 anni fa | 0

| accettato

Carica altro