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

casi 14 años hace | 0

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

casi 14 años hace | 1

| aceptada

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

casi 14 años hace | 9

| aceptada

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

casi 14 años hace | 0

| aceptada

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

casi 14 años hace | 0

| aceptada

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

casi 14 años hace | 0

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

casi 14 años hace | 1

| aceptada

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

casi 14 años hace | 0

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

casi 14 años hace | 0

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

casi 14 años hace | 3

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

casi 14 años hace | 4

| aceptada

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

casi 14 años hace | 0

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

casi 14 años hace | 1

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

casi 14 años hace | 1

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

casi 14 años hace | 1

| aceptada

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

casi 14 años hace | 0

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

casi 14 años hace | 3

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

casi 14 años hace | 0

| aceptada

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

casi 14 años hace | 2

| aceptada

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

casi 14 años hace | 1

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

casi 14 años hace | 0

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

casi 14 años hace | 1

Respondida
Single line string find
find(strcmp(test,data))

casi 14 años hace | 0

| aceptada

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

casi 14 años hace | 0

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

casi 14 años hace | 0

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

alrededor de 14 años hace | 0

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

alrededor de 14 años hace | 0

| aceptada

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

alrededor de 14 años hace | 0

| aceptada

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

alrededor de 14 años hace | 2

| aceptada

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

alrededor de 14 años hace | 0

| aceptada

Cargar más