Réponse apportée
lsqnonlin problem - Where did I go wrong?
Before trying to do the optimization, try testing your function first: calibration(rand(12,1)) This gives an error (the ...

environ 14 ans il y a | 0

Réponse apportée
X Y Z Surface Plot Problem
data = xlsread('filename.xlsx'); % read in everything (numeric) t = data(1,2:end); % first row (except firs...

environ 14 ans il y a | 1

| A accepté

Réponse apportée
matlab certification
Ask and it shall be given unto you: There is now a new answer to this queston: yes. In case you missed it: *yes*. And to cl...

environ 14 ans il y a | 9

| A accepté

Réponse apportée
Changing function with Iteration
So you have a bunch of functions called |ArithOper1.m|, |ArithOper2.m|, |ArithOper3.m|, etc? If there's a small enough number o...

environ 14 ans il y a | 0

| A accepté

Réponse apportée
choose two coordinates
idx = (y == mode(y)); x(idx) y(idx) or, if x and y are columns of a matrix idx = (xy(:,2) == mode(xy(:,2))); ...

environ 14 ans il y a | 0

| A accepté

Réponse apportée
assign input to variable name
Generally this isn't a great idea, but if you want to, you can use |eval|. First make a string of the command you want to issue...

environ 14 ans il y a | 0

Réponse apportée
reason for this error??
i_close =(gi,se2); This isn't valid MATLAB. Should there be a function call here, or are you trying to concatenate? Eg ...

environ 14 ans il y a | 1

| A accepté

Réponse apportée
eigen values of 3D matrix
I have suggestions how to do it without the |for| loop, but not in a way that will speed things up! :) Making a block diagonal...

plus de 14 ans il y a | 0

Réponse apportée
Character array with one letter
Easy char(46*ones(size(cha))) Not so easy regexprep(char,'\w','.') :)

plus de 14 ans il y a | 0

Réponse apportée
plot3+color
Sorry, just noticed this hasn't been answered for some reason. Simplest solution is to make a scatter plot rather than a line p...

plus de 14 ans il y a | 3

Réponse apportée
Sorting NaN
As long as you don't have any |-Inf| values in |a|, you could always do a quick hack: a=[1 2 3;4 5 6;7 8 9;NaN NaN NaN] ...

plus de 14 ans il y a | 4

| A accepté

Réponse apportée
Simple reformat data question
How much does this need to generalize? If |a| might be very long, using a transpose is inefficient. Will the number of element...

plus de 14 ans il y a | 0

Réponse apportée
How to put Matlab variables into dos command
Do you want to pass the *value* in |matlab_variable| in the dos command? That is, if |matlab_variable = 42|, you're trying to i...

plus de 14 ans il y a | 1

Réponse apportée
Conditionally Format Bar Chart
Not sure if I understand your comment exactly, but it sounds like you have x & y data, then another variable z(x) that is +1 or ...

plus de 14 ans il y a | 1

Réponse apportée
loop intial guesses in fsolve
Works for me. Some possible reasons for your error: |p| is already defined in your workspace, in a way that doesn't allow the a...

plus de 14 ans il y a | 1

| A accepté

Réponse apportée
batch reading of xls files
Any array in MATLAB must have consistent dimensions, so if you really want a 3-D array of numbers (doubles), you would have to p...

plus de 14 ans il y a | 0

Réponse apportée
use matrix, premutation?
I think this is what you're after: c=[1,2,3,4,5]; cp = perms(c); % 0*c1, 72*c2, 144*c3, 216*c4, 288*c5 allc = bsxf...

plus de 14 ans il y a | 3

Réponse apportée
Menu Gui - how to have the menu box always displayed
Unfortunately [voice = Morbo] |menu| does not work that way [/voice]. There are two alternatives I can think of: 1) use |menu| ...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
Appending two or more .mat files
If I interpret your question correctly, you have two MAT-files containing the same variable names, but with different data, and ...

plus de 14 ans il y a | 2

| A accepté

Réponse apportée
combine date & time
What class are |day| and |time|? If they are char arrays, then: ns = datenum(strcat(day,32,time)); If they are cell arr...

plus de 14 ans il y a | 1

Réponse apportée
How to access displayed axis limits when scaling is logarithmic and data partly negative?
A hack would be to use the |YTick| values instead, as there's always a tick at the top and the bottom by default. yl = get(...

plus de 14 ans il y a | 0

Réponse apportée
??? Reference to non-existent field 'matlab'.
A shot in the dark, but... your filename isn't something like |myfile.matlab.m| is it...?

plus de 14 ans il y a | 1

Réponse apportée
Single line string find
find(strcmp(test,data))

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
How do I use an array of files?
Strings in MATLAB are treated as a matrix of characters. Hence, fname = ['Specimen_RawData_1.xls','Specimen_RawData_2.xls'...

plus de 14 ans il y a | 0

Réponse apportée
Distance between two points - use ginput!
Just because I can, here's a one-line version: d = sqrt(sum([diff(reshape(xy(1,:),2,[]));diff(reshape(xy(2,:),2,[]))].^2)) ...

plus de 14 ans il y a | 0

Réponse apportée
sobel
This doesn't seem to be any MATLAB Toolbox function, nor anything on the File Exchange. So I'm assuming this is code you've inh...

plus de 14 ans il y a | 0

Réponse apportée
wind_rose execution
It looks like you're using a File Exchange submission called <http://www.mathworks.com/matlabcentral/fileexchange/17748-windros...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
Setting matrix with functions or for loop
How general does this need to be? And why do you want to use a loop specifically? This does what you're asking, and would gene...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
rename a variable
Let me see if I interpret the question correctly: you have filename = 'bob'; data = [1,2,3]; And you want to rename |...

plus de 14 ans il y a | 2

| A accepté

Réponse apportée
Finding an average curve
When you say "find the trendline of each curve" I assume you mean that you have several sets of (x,y) data and you're doing a (l...

plus de 14 ans il y a | 0

| A accepté

Charger plus