已回答
Loop Problem
You have two loops when you just need one. Essentially you're looping through the entire binary variable for each p value, but e...

12 years 前 | 0

| 已接受

已回答
Surface plot problem,
You're not feeding the proper inputs into surfc. surfc(x,y,z,c) requires x be a vector of length(n), y a vector of length(m), si...

12 years 前 | 0

| 已接受

已回答
Help with plotting multiple line complete with legends.
Tim, See a previous answer that I helped a guy out with here: <http://www.mathworks.com/matlabcentral/answers/29799-adding...

12 years 前 | 0

已回答
GUIDE
You can't put a 5 character string into a single spot in a matrix. You'll need to use cell arrays to do what you're trying to do...

12 years 前 | 1

| 已接受

已回答
plotting in a loop - new figure window
how about: clear all Data.S1 = struct('data1',rand(12,1),'data2',rand(12,1),'data3',rand(12,1)); Data.S2 = struct('d...

12 years 前 | 1

| 已接受

已回答
request user input for a number of inputs
There are several ways to do this, but if you're wanting cell arrays, I'd do something like this: for i = 1:length(Location...

12 years 前 | 1

| 已接受

已回答
error occuring
I'll go ahead and throw out the obvious, ensure that 'bw2' is a 2-dimensional numeric matrix. <http://www.mathworks.com/help/to...

12 years 前 | 0

已回答
cheby1
Chebyshev Type 1 filter design <http://www.mathworks.com/help/toolbox/signal/ref/cheby1.html> 1-D digital filter <http:...

12 years 前 | 0

| 已接受

已回答
Function definitions are not permitted at the prompt or in scripts
If I'm reading your website correctly, you're saying that this is a script named fftAI.m: [d, time] = getdata(ai, ai.Sample...

12 years 前 | 0

已回答
What do you think of Cody, new service for MATLAB Central
I like Cody as a set of brain teasers that may force you to think about fairly unique problem that you may not have encountered ...

12 years 前 | 2

已回答
GUIDE-edit text
you would put that code that you wrote in the edittext callback function.

12 years 前 | 0

已回答
naming a structure
You can use eval, but eval needs to be used with extreme care. You can really screw things up accidentally. eval([NewName '...

12 years 前 | 2

| 已接受

已回答
Processing files using a for loop
something like this: myDir = uigetdir; %gets directory myFiles = dir(fullfile(myDir,'*.wav'); %gets all wav files in str...

13 years 前 | 16

已回答
Does "sortrows" not work with a semicolon?
Works fine for me. I did this: a = magic(5); b = sortrows(a,-1); When you say, does not work, do you mean it gives yo...

13 years 前 | 0

已回答
changing the style in a loop with hold all...
I found a solution to this, which I just put in your previous question. If you set the default colororder and linestyleorder,...

13 years 前 | 4

| 已接受

已回答
How do I create a legend and include loop variable values in the labels?
Not in the way that you're currently doing it, but if you're not married to the idea of using your P variable how you currently ...

13 years 前 | 6

已回答
plotting problem
Have you tried just adjusting the y-axis scale? doc axis

13 years 前 | 0

已回答
How do I create a legend and include loop variable values in the labels?
When you create a plot, you can specify the legend labels by setting the “DisplayName” property as name-value pair. Set the "Dis...

13 years 前 | 60

| 已接受

已回答
Importing formated time data into matlab
Ok, so it looks like you won't be able to use matlabs fancy, easy data importer with this file, but if you will always be gettin...

13 years 前 | 0

已回答
Importing formated time data into matlab
It all depends on what you're wanting to do with this data. You may be able to use the time just fine as a string. I'd suggest l...

13 years 前 | 0

| 已接受

已回答
Custom fitting equations: Using a TriScatteredInterp Object
I don't think TriScatteredInterp is what you're wanting to use there. TriScatteredInterp is used similar to griddata, in that yo...

13 years 前 | 0

已回答
pushbutton
Your code: function pushbutton1_Callback(hObject, eventdata, handles) % nacitanie prvku h=findobj(0,'Type','figure'...

13 years 前 | 1

| 已接受

已回答
Create 3D Surface
It appears that Xl should be a 3x66 numeric matrix and width should be a 1x66. Xl(1,:) looks like it contains an x coordinate fo...

13 years 前 | 0

已回答
Cell matrix
For the first part, here's how to create two cell arrays that are BEST_BID and BEST_ASK: BEST_BID = myArray(strcmp(n(:,2),'...

13 years 前 | 0

已回答
integration
use the trapz function source: help file

13 years 前 | 1

| 已接受

已回答
plotyy with sync yaxis tics on both sides
Matlab allows you to switch the ticks on both axes. plotyy is creating two overlapping axes on the figure. When you execute this...

13 years 前 | 0

| 已接受

已回答
Can I do this?
It looks like this is all that's wrong: func = @(x) x(3)*(47e3-Al(x)+Aj(x)+Ak(x)); I'm assuming x is a 3 value vector?

13 years 前 | 0

| 已接受

已回答
Plot using scatter3 function.
It takes 3 variables to make a plot in scatter3, but if you mean you have 3 sets of x,y,z parameters then: figure hold o...

13 years 前 | 0

已回答
Plot a second order equation and plot two equations on the same grafic
You can plot multiple sets of data on one figure multiple ways. The first way would be: plot(x1,y1,x2,y2,...) The next m...

13 years 前 | 0

| 已接受

已回答
How must I declare a function handle that refers to a function you've written? What syntax is necessary?
Is 'spectrum' actually getting passed into your function psi_en? It looks like, if it isn't and 'en' in passed in correctly, 'y'...

13 years 前 | 0

加载更多