답변 있음
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년 초과 전 | 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년 초과 전 | 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년 초과 전 | 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년 초과 전 | 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년 초과 전 | 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년 초과 전 | 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년 초과 전 | 0

답변 있음
cheby1
Chebyshev Type 1 filter design <http://www.mathworks.com/help/toolbox/signal/ref/cheby1.html> 1-D digital filter <http:...

12년 초과 전 | 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년 초과 전 | 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년 초과 전 | 2

답변 있음
GUIDE-edit text
you would put that code that you wrote in the edittext callback function.

12년 초과 전 | 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년 초과 전 | 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...

12년 초과 전 | 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...

12년 초과 전 | 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,...

12년 초과 전 | 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 ...

12년 초과 전 | 6

답변 있음
plotting problem
Have you tried just adjusting the y-axis scale? doc axis

12년 초과 전 | 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...

12년 초과 전 | 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...

12년 초과 전 | 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...

12년 초과 전 | 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...

12년 초과 전 | 0

답변 있음
pushbutton
Your code: function pushbutton1_Callback(hObject, eventdata, handles) % nacitanie prvku h=findobj(0,'Type','figure'...

12년 초과 전 | 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...

12년 초과 전 | 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),'...

12년 초과 전 | 0

답변 있음
integration
use the trapz function source: help file

12년 초과 전 | 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...

12년 초과 전 | 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?

12년 초과 전 | 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...

12년 초과 전 | 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...

12년 초과 전 | 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'...

12년 초과 전 | 0

더 보기