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

más de 12 años hace | 0

| aceptada

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

más de 12 años hace | 0

| aceptada

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

más de 12 años hace | 0

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

más de 12 años hace | 1

| aceptada

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

más de 12 años hace | 1

| aceptada

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

más de 12 años hace | 1

| aceptada

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

más de 12 años hace | 0

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

más de 12 años hace | 0

| aceptada

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

casi 13 años hace | 0

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

casi 13 años hace | 2

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

casi 13 años hace | 0

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

casi 13 años hace | 2

| aceptada

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

casi 13 años hace | 16

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

casi 13 años hace | 0

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

casi 13 años hace | 4

| aceptada

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

casi 13 años hace | 6

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

casi 13 años hace | 0

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

casi 13 años hace | 60

| aceptada

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

casi 13 años hace | 0

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

casi 13 años hace | 0

| aceptada

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

casi 13 años hace | 0

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

casi 13 años hace | 1

| aceptada

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

casi 13 años hace | 0

Respondida
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),'...

casi 13 años hace | 0

Respondida
integration
use the trapz function source: help file

casi 13 años hace | 1

| aceptada

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

casi 13 años hace | 0

| aceptada

Respondida
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?

casi 13 años hace | 0

| aceptada

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

casi 13 años hace | 0

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

casi 13 años hace | 0

| aceptada

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

casi 13 años hace | 0

Cargar más