Respondida
nlinfit - iteration limit exceeded error
Probably your termination tolerance is too small for the data you're throwing at it. Play with the options 'MaxIter', 'TolFun...

casi 14 años hace | 0

Respondida
detect the longest edge and calculate the slope
What about using the Hough transform to detect lines in your edge image? You could search the resulting Hough-space for lines w...

casi 14 años hace | 0

Respondida
How to write a loop for adding number
If you think about what you're doing, it's just a cumulative sum. Put all your variables into a vector: vec = [a b c d ....

casi 14 años hace | 0

Respondida
adding data to a text file
I remember answering an almost identical question from you the other day. It used the fopen() with the open-mode 'w' to overwri...

casi 14 años hace | 1

Respondida
loop-free numeric array indexing when numeric array inside cell array
You can use *cellfun* for this if you combine the _C_ and _ind_ cell arrays: _ie_ chuck the _ind_ array as a new column in _C_....

casi 14 años hace | 0

| aceptada

Respondida
trouble for importing a data file
Using *textread* is fine here. But you need to include as many fields in your format string as you expect to see in the file,...

casi 14 años hace | 0

Respondida
Multithreading with mex functions
I'm not sure if I've interpreted your question correctly, but I think your main problem is working out how to get data back to M...

casi 14 años hace | 2

| aceptada

Respondida
Best way to structure code with large matrices shared between multiple functions
MatLab is pretty clever about when to copy and when to pass by reference. Generally, a matrix passed as a parameter will only b...

casi 14 años hace | 0

Respondida
browse for an excel file and save the data as a matrix
Use the function *uigetfile* to browse for a filename, then pass that name to *xlsread*.

casi 14 años hace | 0

| aceptada

Respondida
importdata() question
Are you sure? If you look closely, you'll see the display is saying '1.0e+003 *'. That means your numbers are correct, but are...

casi 14 años hace | 0

Respondida
Extract part of the text file
I would do it as follows: First, slurp the entire file into a cell array. fileID = fopen('input.txt', 'r'); lines =...

casi 14 años hace | 0

| aceptada

Respondida
overwrite a text file with other data
Let's say your value is in the variable called v: v = [3 6 9]; You can use _save_ which will output lots of extra decima...

casi 14 años hace | 0

Respondida
error in reading frames
You're constructing one filename out of lots of them. You're also assuming that the files are listed in order. You need to get...

casi 14 años hace | 0

| aceptada

Respondida
Kinect(Microsoft SDK) Skeleton (recorded ) Data from pixel to 3d World Coordinates
Are you saying you acquired the same gesture data from the same unit but in different formats? Are your time stamps the same? ...

casi 14 años hace | 0

Respondida
Connecting matlab and visual studio
If this is to be deployed on a server somewhere, it might get a little fiddly. However, if you simply have MatLab and VS runn...

casi 14 años hace | 1

| aceptada

Respondida
lsqcurve fit precision problem?
Probably, like you say, related to scale. You can use _optimset_ to adjust the solver: > opts = optimset('lsqcurvefit');...

casi 14 años hace | 0

Respondida
random number from a data set with a specified error
This question is open to interpretation. What I _think_ you have is a dataset X with known standard deviations S (a vector co...

casi 14 años hace | 0

| aceptada

Respondida
Plane in 3D space
Without really trying to look at your maths, let me suggest that you will have less issues if you treat your 3D objects in a sta...

casi 14 años hace | 0

| aceptada

Respondida
Function to format number as currency?
Hehe, everyone's got a different function. I wrote a pretty inefficient tail-recursive solution, which might not be the "MatLab...

casi 14 años hace | 0

Respondida
Correlation values of various time periods
It appears you just want an index that slices the data in intervals: N = length(Data.L1); idx1hr = 1:N; idx2hr = 1:...

casi 14 años hace | 0

Respondida
find a string element in a structure matrix
Direct comparison operators (==, etc) don't work with strings. You need to use _strcmp_ or _strcmpi_ (which ignores case). ...

casi 14 años hace | 1

Respondida
How can I format a percent using 2 digits after the decimal
If you want to do it without using strings: round(x * 100) / 100; One reason you might want to do that is if you have a ...

casi 14 años hace | 3

Respondida
Constrained Polynomial Regression
So you mean that you want to constrain a cubic polynomial regression such that the x^2 term is zero? For this I would use _fs...

casi 14 años hace | 2

| aceptada

Respondida
Extracting a block from a big array
I like using _find_ for these kinds of problems. To find all the starting indices of your blocks, you can go: idxStart = f...

casi 14 años hace | 0

Respondida
Variable name not coming properly in the generated code
Does it happen when you have other numeric suffices on your variable names? _ie_ if you have the variable 'abc_f31' or 'abc_f33...

casi 14 años hace | 0

Respondida
converting decimal year into julian day or a [Y,M,D] vector??
That's not the correct usage of datevec and datestr. The first thing you need to do is work out how many days are in that yea...

casi 14 años hace | 3

| aceptada

Respondida
Move subplot title and create colored line beside it.
I don't know how to answer your 'line' question, but to set the title position do this: h = get(gca, 'Title'); set(h, 'U...

casi 14 años hace | 1

Respondida
saving a value and reseting other variables in a loop
I think you're asking two questions: a) Why is the indexing broken? b) What is a better way to do this? I'll ask you my...

casi 14 años hace | 0

| aceptada

Respondida
please i need to know How connect sql with matlab???
WampServer uses MySQL, I believe. You need to install the MySQL ODBC driver: <http://dev.mysql.com/downloads/connector/odbc/...

casi 14 años hace | 2

| aceptada

Respondida
Making change with coins, problem (greedy algorithm)
Have already voted on Srinivas' correct answer to your question, but this is for your interest and study: function [coins] ...

casi 14 años hace | 2

Cargar más