Réponse apportée
Regarding 3D plots with Matlab
So what kind of visualization do you want at the end? Do you want a surface? In which case you could do something like x ...

plus de 15 ans il y a | 0

| A accepté

Réponse apportée
Regarding 3D plots with Matlab
I'm not sure I understand what you're after. It sounds a bit like plot3(parameter(1),parameter(2),Number,'o')

plus de 15 ans il y a | 0

Réponse apportée
bar graph
Rather than use |hold|, why not do h = bar(1); axis(...) outside the loop, then in the loop do set(h,'YData',i)

plus de 15 ans il y a | 0

Réponse apportée
How can i store multiple data into same excel file ?
I'm going to assume that the issue is that you want to run this code again later (with different data), so you don't necessarily...

plus de 15 ans il y a | 0

Réponse apportée
How to convert string to time?
If you want an actual decimal minute value: x = '04:55' y = str2double(regexp(x,':','split')) z = y*[1;1/60] (Leave off ...

plus de 15 ans il y a | 2

Réponse apportée
New column
I think this does what you want: Price = randi(10,20,1) buy = [true;diff(Price)>=0]; idx = find(~diff(Price)); buy(idx+...

plus de 15 ans il y a | 0

| A accepté

Réponse apportée
colorbar
You can change your colormap to have more colors. The default is 64. colormap(jet(128))

plus de 15 ans il y a | 0

| A accepté

Réponse apportée
import time
You can use |textscan| to read arbitrarily formatted data from a text file. If you want to keep the values between the colons s...

plus de 15 ans il y a | 0

Réponse apportée
Fliplr and flipud functions no longer accepts vectors
|ismatrix| is true for a vector or even a scalar -- everything in MATLAB is a matrix unless you force it not to be (eg a 3-D arr...

plus de 15 ans il y a | 0

Réponse apportée
how to read a data file with textscan when the the data type is inconsistant
A simple hack workaround would be to read the first column as a string, then remove anything non-numeric from that string and co...

plus de 15 ans il y a | 0

Réponse apportée
Definition of function
Are there any lines of code above the function definition line? That will generate that error message. For example: filen...

plus de 15 ans il y a | 0

Réponse apportée
What should take the longest time to run in matlab?
Just to mess with you, there are some other subtleties about the way MATLAB handles passing data to functions, which will come i...

plus de 15 ans il y a | 0

Réponse apportée
Select rows from txt file
How are you going to store the data once you get it? Do you just want the text? Or do you actually want to read in data? If t...

plus de 15 ans il y a | 0

| A accepté

Réponse apportée
Lagrange Interpolation code
Hmm, maybe you should form a study group with <http://www.mathworks.com/matlabcentral/answers/3338-lagrange-interpolation-m buxZ...

plus de 15 ans il y a | 0

Réponse apportée
loop
The |n| th row of the matrix variable |AF|. The colon stands for all indices, and MATLAB indexes by row-then-column. Hence, |A...

plus de 15 ans il y a | 0

| A accepté

Réponse apportée
How to read information from a txt file header?
Assuming the header information is always the same format (or at least same number of lines): fid = fopen('data2.txt','rt'); ...

plus de 15 ans il y a | 1

| A accepté

Réponse apportée
Solving nonlinear scalar ode's
Given that you have to use AB2 (with, apparently, a fixed stepsize) I going to take a guess that this is a numerical analysis ho...

plus de 15 ans il y a | 0

| A accepté

Réponse apportée
texscan multiple variables
fmt = repmat('%f',1,30); d = cell2mat(textscan(fid,fmt));

plus de 15 ans il y a | 0

| A accepté

Réponse apportée
Headers in Matlab
Perhaps <http://www.mathworks.com/help/toolbox/stats/datasetclass.html |dataset| arrays> are what you're looking for? The synta...

plus de 15 ans il y a | 3

Réponse apportée
ring (annulis) patch?
How's this? The patch is a single object, but you have to add the edge lines separately in this approach (otherwise you see the...

plus de 15 ans il y a | 2

Réponse apportée
Writing an M-file for an iteration of x=cos(x)
Check out <http://www.mathworks.com/matlabcentral/answers/1148-how-to-learn-matlab this discussion> for some suggestions on lear...

plus de 15 ans il y a | 0

Réponse apportée
Reading a multi line string into a single string
You can read the whole contents of a file using <http://www.mathworks.com/help/matlab/ref/fileread.html |fileread|>. Then use <...

plus de 15 ans il y a | 0

Réponse apportée
Can I call this plot as Contour plot?
What you're doing is called a parametric plot - x(t) against y(t) for a parameter variable t.

plus de 15 ans il y a | 1

| A accepté

Réponse apportée
Curve fitting with no input give
Do you mean that you have data but no idea about the curve to fit? If so, there are nonparametric methods available, such as LO...

plus de 15 ans il y a | 0

| A accepté

Réponse apportée
Converting an image with size of [X, Y, 3, double] to another image with size of [X, Y, 3, uint8]
Assuming the double image has values between 0 and 1, A2 = uint8(255*A1);

plus de 15 ans il y a | 0

Réponse apportée
How to read multiple huge text files, the fastest way?
If you have to read it as ASCII, your best option is |textscan|, which will read directly into whatever numeric format you speci...

plus de 15 ans il y a | 0

Réponse apportée
import tab and comma delimited dat file
I'm not sure if the formatting is exactly how it appears above, but you can probably iron out the kinks yourself. I did assume ...

plus de 15 ans il y a | 0

| A accepté

Réponse apportée
Nonlinear regression
From the doc: "nlintool(X,y,fun,beta0) is a graphical user interface to the nlinfit function, and uses the same input arguments"...

plus de 15 ans il y a | 1

| A accepté

Réponse apportée
Algorithm to match continuous variables
I'm not completely sure if you want just to extract a subset of data, or group all samples into a set of bins. The former you c...

plus de 15 ans il y a | 0

Réponse apportée
MATLAB vs. Excel: Matlab seems to give better answer to exponential decay, anyone know why?
Excel is apparently doing a log of the y data then fitting a line. This approach is very sensitive to outliers. Change your |p...

plus de 15 ans il y a | 3

| A accepté

Charger plus