How to set Matlab not to use or use always regional number formatting? - matlab

My Matlab sometimes uses regional number formatting, and sometimes does not. May I ask it to do this always or may be not to do this at all?
As you see, it uses comma as decimal separator in one line of property editor and uses period as separator in neighboring lines.

As mentioned in the comments, this is not a feature but a bug.
I have tried to reproduce it in version 2012b, but was unable to input non-integer numbers for x, y and z. If this was not possible before it would explain why it has gone unnoticed until now.
So, please post a bug report and it will probably be fixed in one of the the next versions that is published.

Related

How do I stop a spread sheet from auto correcting to a date?

I want to turn off auto-correcting to dates. I have been using spreadsheets for years and never, not once, have I ever used or wanted a date. I want the cell to compute an equation. I want to put in =3/12, or =6/12, or =9/12 equations and have it return an answer of .25, 0.5, or .75 instead of an auto-corrected date. I do not want to use ' because it will keep the fraction text instead of returning an answer from the equation, it would be the same thing if I changed the cell to text, it will no longer calculate an equation. I have put an equal sign in front because that is usually how you indicate that you want it to be an equation, but it still changes the equations to dates. Other equations work and when I put these fractions inside of other equations they work, but they do not work as stand-alone equations, neither does =90/3 or any other. They all get turned into dates and I need them to be used as equations. And yes, I need to be using a spreadsheet and yes, I want to use Open Office. I just want to know how to get it to do what I want it to do. Please Help. I have seen other forums on this topic and many arguments have ensued for no good reason. I just need help with this one simple thing, thank you.

kdb - issue with reading floating numbers

I am reading covariance data from flat files. For that reason, not being able to fully read the floating number results in covarince not satisfying positive semi definite requirements.
For instance, this is one of the input from raw text:
“-0.581050672”— no, actually raw text is this: -5.801050672E-01
When I read this into kdb and cast with F, it results in -0.50810507. When I do this for all and check the covariance, unfortunately it does not satisfy PSD constraints. Other hack I have been doing is to add small noise in Identity matrix…
Apart from this hack, is there way to read above data into proper floating number up to 9th digit? I tried \P and .Q.f but these only seem to work in Display.
Thank you
Sorry, does not seem like a kdb issue. Was exporting these data into different software and floating points were lost during this process. Thanks for pointer.

How to deal with missing values in Kruskal-Wallis test in Matlab?

The Matlab documentation seems unclear about how to ignore missing data when using kruskalwallis, the Kruskal-Wallis (or any other related) test. The same goes for unequal group size.
Very late answer, but I ran into the same problem myself today, might as well help some future searcher.
The solution is pretty straightforward. kruskalwallis is primarily used on matrices and by default compares equal-sized columns, but it does allow you to instead assign groups manually, with the optional variable "group". I was attempting to check whether a single value was unlikely to belong to a distribution from a different set, so this was straightforward. I just added the value I wanted to test on to the end of the set I was testing against, then made "group" a vector of ones the same size as the set, with a "2" added to the end for the new value. Looks like it worked quite nicely.
For numeric data, the the standard missing data value in Matlab is NaN. See ismissing. See also this article from The MathWorks. For tables, you might find standardizeMissing helpful as well as replaceWithMissing for dataset objects. I can't say anything about group size.

how to solve floating point errors in matlab

I have a question that I somehow surprising cannot find an answer to. The issue is about floating point errors. It is not a "why does a==b give 0" question, but rather if there are a way to fix floating point errors. The part of the code where I am right now is sensitive and I need to find a way to solve floating point errors. I have tried with
round(100000*myDouble)/100000;
and with
double(int64(100000*myDouble))/100000
but the output does still have floating point errors for some numbers (not all of them, but a few is enough to mess up my code). The problem is that the function I use in matlab is a polygon clipper which I use to calculate the union of many polygons. The function looks for common points and if there are even a small difference, this will mess everything up. The problem should really not be a problem anyway since it is a union and partly overlapping polygons should not cause trouble. However due to some issues with the function I need to make sure to not have these overlaps. The function works really fine in most cases but to speed up I have added a vector of nan separated polygons with holes and since the function is not expected to handle cases like this there are sometimes problems.
There are no point to use int64 for the calculation instead since the function end up with a mex file and is thus not possible to make it work for int64.
There is not a single answer to solve all floating point precision issues. Some strategies are:
Usage of vpa (or symbolic variables).
Make the errors deterministic. If the same formula is used to calculate the same number twice, the result should be equal.
Don't round using decimal factors. Use 2^x instead. In this case, try 2^16 instead of 100000. This way you round the fraction and keep the exponent.

Problem with block matching in matlab

I have written matlab codes for two different block matching algorithms, extensive search and three step search, but i am not sure how i can check whether i am getting the correct results. Is there any standard way to check these or any standard code which i can run and compare my result with.I read somewhere that JM software can be used but i didnt find any way to use it.
You can always use the results produced by your algorithms to create the next frame of video and then analyze its quality by either visually inspecting it (which is rather subjective, and we like to deal in numbers) or calculating the mean square error between the produced image and the one you're trying to estimate. Mean square error of the exhaustive (extensive) search should be lower than the one three-step gives you.
Well, did you try to plot it? I mean,after the block-matching you have a new image, right?.
A way to know if you result if true or not is to check the sum of the difference of 2 frames.
A - pre_frame
B - post_frame
C - Compensated frame
If abs(abs(A-B)) is lower than abs(abs(A-C))) that mean it could be true.
Next time, try to specify your algoritm. Also, put your code here to help you more.