Answered
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 ago | 0

| accepted

Answered
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 ago | 0

| accepted

Answered
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 ago | 0

Answered
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 ago | 1

| accepted

Answered
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 ago | 1

| accepted

Answered
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 ago | 1

| accepted

Answered
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 ago | 0

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

12 years ago | 0

| accepted

Answered
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 ago | 0

Answered
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 ago | 2

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

12 years ago | 0

Answered
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 ago | 2

| accepted

Answered
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 years ago | 16

Answered
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 years ago | 0

Answered
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 years ago | 4

| accepted

Answered
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 years ago | 6

Answered
plotting problem
Have you tried just adjusting the y-axis scale? doc axis

12 years ago | 0

Answered
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 years ago | 60

| accepted

Answered
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 years ago | 0

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 0

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

12 years ago | 1

| accepted

Answered
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 years ago | 0

Answered
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 years ago | 0

Answered
integration
use the trapz function source: help file

12 years ago | 1

| accepted

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 0

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 0

Load more