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

fast 14 Jahre vor | 0

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

fast 14 Jahre vor | 0

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

fast 14 Jahre vor | 0

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

fast 14 Jahre vor | 1

Beantwortet
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_....

fast 14 Jahre vor | 0

| akzeptiert

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

fast 14 Jahre vor | 0

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

fast 14 Jahre vor | 2

| akzeptiert

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

fast 14 Jahre vor | 0

Beantwortet
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*.

fast 14 Jahre vor | 0

| akzeptiert

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

fast 14 Jahre vor | 0

Beantwortet
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 =...

fast 14 Jahre vor | 0

| akzeptiert

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

fast 14 Jahre vor | 0

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

fast 14 Jahre vor | 0

| akzeptiert

Beantwortet
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? ...

fast 14 Jahre vor | 0

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

fast 14 Jahre vor | 1

| akzeptiert

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

fast 14 Jahre vor | 0

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

fast 14 Jahre vor | 0

| akzeptiert

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

fast 14 Jahre vor | 0

| akzeptiert

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

fast 14 Jahre vor | 0

Beantwortet
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:...

fast 14 Jahre vor | 0

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

fast 14 Jahre vor | 1

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

fast 14 Jahre vor | 3

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

fast 14 Jahre vor | 2

| akzeptiert

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

fast 14 Jahre vor | 0

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

fast 14 Jahre vor | 0

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

fast 14 Jahre vor | 3

| akzeptiert

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

fast 14 Jahre vor | 1

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

fast 14 Jahre vor | 0

| akzeptiert

Beantwortet
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/...

fast 14 Jahre vor | 2

| akzeptiert

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

fast 14 Jahre vor | 2

Mehr laden