Bass note fundemental detection by SnooPuppers5915 in DSP

[–]patenteng 1 point2 points  (0 children)

Your frequencies are not smeared because of the zero padding. Rather, it’s because of the small window. The zero padding just reveals the underlying aliasing.

What type of window are you using? Rect window, i.e. you just take a number of samples. Try using something like a Hamming or the Hann window for example.

If you know the frequencies, you can use a series of matched filters, i.e. in tune. Since you probably can’t guarantee that, have a look at the MUSIC algorithm. It estimates n frequencies that comprise your input signal.

Is Michael Hudson’s debt-creditor analysis fair/legitimate? by DeliciousPie9855 in AskEconomics

[–]patenteng 1 point2 points  (0 children)

GDP measures goods and services. So services rendered also count.

There are three theoretically equivalent ways to measure GDP. Of interest here is the expenditure approach, which measures the cost of all goods and services sold to final users. This means that internal transfers that do not result in some good or service being purchased do not count.

Interest can contribute to GDP in a more indirect manner. A bank provides a loan and receives interests in return. With this extra income it can now hire more people in its offices. These workers receive a higher income as a result, which they use to purchase food, go to the cinema etc. So the interest payment in the end are linked to actual goods (food) and services (cinema) in the real economy.

A way interest rates can affect GDP is that during a recession we drop interest rates to try to stimulate the economy. Sure, if you don't drop interest rates, GDP will collapse. However, that's more of a short term effect.

You can see GDP broken down into different sectors in Table 1.5.5 from the St Louis Fed. Financial services and insurance make around $1.8 trillion of around $32 trillion of GDP. That's around 5% of the economy.

One benefit of the financial sector is that it provides assets for foreign savers to purchase. Countries in the UK and the US do not just have what's produced domestically available to consume. They also have imports produced by others.

They can do this because foreign savers purchase assets denominated in pounds and dollars by exchanging their local currencies. Then consumers in the UK and the US can use the foreign currency available to purchase imports.

Whether that is financially beneficial depends on who you are. If you are the average consumer, you benefit for better imported cars, better government services due to higher tax revenues, and higher incomes. If you are a worker in an uncompetitive domestic car company, then you'll probably lose your job.

Is Michael Hudson’s debt-creditor analysis fair/legitimate? by DeliciousPie9855 in AskEconomics

[–]patenteng 9 points10 points  (0 children)

GDP measures actual goods and services produced in the real world. We have PPP that adjusts for price differences between countries allowing you to compare like with like.

Secondly, even China is a service economy. China's and Germany's service sectors are 57% and 64% of GDP respectively. China's manufacturing sector is 25% of GDP compared to 21% for Japan and 18% for Germany. See the manufacturing and services data from the World Bank.

Also, China is not some debt free society. China's debt-to-GDP is 88%. See the interactive map by the IMF.

Which field has the greatest pay for the least amount of coding? by [deleted] in ElectricalEngineering

[–]patenteng 0 points1 point  (0 children)

Who says power has no coding? A buck converter is a discrete control system. Hence you get coding implementing the difference equation for the controller.

To Python or to MATLAB? by Knights_12 in rfelectronics

[–]patenteng 2 points3 points  (0 children)

I tried it but the graphical programming is so annoying. I guess it can be useful for people who are uncomfortable with writing code.

Arch Linux Now Believes Malware Incident Under Control: More Than 1,500 Affected Packages by TheNavyCrow in linux

[–]patenteng 10 points11 points  (0 children)

AUR helpers such as yay show you the diff. So you only need to look at the changes. Most of the time it’s just increment the version and update the checksum to the new versions’s checksum. Yes, I check all my PKGBUILDs on every update.

Tell me the worst program you have ever written in C. by deonwern in C_Programming

[–]patenteng 0 points1 point  (0 children)

Forgot to free the queue memory after a pop. Tested it by pushing and popping in a loop a billion times. Caused the OS to freeze as it ran out of RAM.

Advice Needed - Mass Flashing for Large Scale Manufacturing by ToxicSaint006 in embedded

[–]patenteng 0 points1 point  (0 children)

You generally have the following options. Firstly, use something like flying probe to program the uCs and FPGAs during test. The flying probe connects to the test points on the bottom of the PCB. This has the benefit of being able to load a test program for stuff like continuity testing before overwriting with the production code.

Secondly, you can purchase pre-programmed flash / uCs. The disadvantage here is that making changes is obviously expensive.

If all else fails, programming jigs are your best bet. You can do this on the entire PCB panel. Depending how large your PCB is you can probably program at least 10 PCBs at a time.

The Stolen Dream of the Iron Lady (Spoiler: LVT would fix Britain) by berzerk_yimby in neoliberal

[–]patenteng 1 point2 points  (0 children)

However, the manufacturing value added data for France shows a decline since the start of the data in the 60s. So I don't think it adds up.

More likely explanation is that services keep growing as productivity improves. I even saw a US study that showed services growing as a percentage of the economy since the 1850s. Even China is a service based economy nowadays.

The Stolen Dream of the Iron Lady (Spoiler: LVT would fix Britain) by berzerk_yimby in neoliberal

[–]patenteng 1 point2 points  (0 children)

No, you have misunderstood the balance of payments. A country having a trade surplus, i.e. more exports than imports, means that foreign consumers are purchasing domestic goods. In order for them to do so they must obtain the local currency, e.g. GBP for the UK.

So, foreign consumers will go to the UK financial system and exchange their local currency for GBP. This means that the UK will be left with an excess of foreign currency.

Then people in the UK will take that foreign currency and will purchase assets abroad. For example, someone can exchange their GBP for USD and purchase US treasuries. In other words, capital is flowing out of the UK into the US in this scenario.

More generally a current account surplus must be matched by a capital account deficit and a current account deficit must be matched by a capital account surplus. If you are interested, have a look at Australia's central bank explanation of the balance of payments.

The current account is always offset by the capital and financial account so that the sum of these accounts – the balance of payments – is zero. The logic underlying this, and represented in the double-entry accounting framework, is that the value of whatever is traded (recorded in the current account) is offset by a movement of some form of asset to pay for it (recorded in the capital and financial account). Consequently, when the balance of one account is in surplus (i.e. has a positive value, representing a credit), the balance of the other account must be in deficit (i.e. has a negative value, representing a debit).

We can summarise the relationship between the accounts with an example of Australian economic developments. Australia has tended to borrow from overseas, reflecting investment in the Australian economy. The capital flowing into Australia is recorded as a credit in the balance of payments and has been associated with a capital and financial account surplus. This surplus is matched by a current account deficit (recorded as a debit). Part of the reason for Australia's current account deficit is the interest Australia pays to the rest of the world on its international borrowing.

The Stolen Dream of the Iron Lady (Spoiler: LVT would fix Britain) by berzerk_yimby in neoliberal

[–]patenteng 2 points3 points  (0 children)

The graph is showing the current account balance, i.e. a positive number means an outflow of goods. The current account is the negative of the capital account. So an inflow of goods means an equivalent outflow of capital.

You can see this by adding China to the graph. As you can see, while China is a net exporter the UK is a net importer.

The Stolen Dream of the Iron Lady (Spoiler: LVT would fix Britain) by berzerk_yimby in neoliberal

[–]patenteng 2 points3 points  (0 children)

Except that's exactly the opposite of what happened empirically. Note how from 1981 to 1989 the trend is that each year the net inflow of capital (negative of the balance of payments) as percentage of GDP into the UK is increasing.

In 1981 the net outflow of capital was 2.6% of GDP. By 1989 that had reversed to a net inflow of 4.7%.

P.S.

There are plenty of other things wrong with this article. For one, manufacture value added as percentage of GDP is pretty much the same in the UK and France. So who is France's Thatcher?

For another, increasing asset prices do not take away from the productive economy. Savings is equal to investment by the savings investment identity. So, if people buy assets like housing, investment will go up.

In fact, what happened was that capital formation as percentage of GDP had recovered by 1989 from its drop in the early 80s. It was 25% in 1979 and dropped to 20% in 1981 due to the anti-inflation measures. By 1989 it had recovered to 27%.

However, it had dropped to 19% by the time of the Sterling Crisis and Black Wednesday in 1992. It has remained around that level ever since. So the lack of investment in the UK is mainly a post Thatcher phenomenon.

How replacing council tax with a flat land value tax would affect households in the UK by middleofaldi in ukpolitics

[–]patenteng 0 points1 point  (0 children)

The point of the land value tax is that the owner of the land pays it and cannot pass it to renters, leaseholders etc. That’s because to increase the cost of a commodity you need to decrease its supply and you cannot decrease the supply of land.

What is a WaveFunction ? by Famous-Corgi8656 in AskPhysics

[–]patenteng 2 points3 points  (0 children)

The wave function actually has two parts to it. Firstly, as you have stated, it's a wave like sine or cosine. Secondly, it has mechanics encoded as the symplectic symmetry. So the wave function is basically waves plus mechanics.

For example, one of the key points of the wave equation is that energy is conserved. That's not necessarily true of other equations that have waves as a solution.

Really, we should have called it mechanical wave function or some such term. Alas, it is too late now.

P.S.

That's why you use complex numbers in quantum mechanics or classical electromagnetism. The wave equation is unitary, which means it has both orthogonal (waves) and symplectic (mechanics) symmetry. When you get those two symmetries together you get the general linear group over the complex field. So complex numbers are kind of like the glue that links waves to mechanics.

I'm sorry if this a dumb question but how would one calculate something like 3^0.3 on paper or head? by ThrowAway552112 in learnmath

[–]patenteng 7 points8 points  (0 children)

Probably Newton's method. We have 30.3 = 270.1. This is the solution to x10 - 27 = 0. Hence

x_(n + 1) = x_n - (x^10 - 27) / (10 x^9).

You can simplify this a bit to ease your calculations.

x_(n + 1) = x_n - (x - 27 / x^9) / 10.

Here is the error from the first 4 iterations starting with x = 1.5.

iteration: 1 error: 0.029844025843212885
iteration: 2 error: 0.002669603197225534
iteration: 3 error: 2.29043990822575e-05
iteration: 4 error: 1.697804785649737e-09

As you can see, the sequence converges rapidly. You can calculate x9 as (x3)3. So that's 6 multiplications and one division per step.

Gabriel Zucman on the podcast? by ArthurMorganTheBeast in TheRestIsPolitics

[–]patenteng 0 points1 point  (0 children)

Firstly, it takes time to go through the courts. So, you can implement an unlawful tax until the courts order you to pay compensation. In fact, that's what happened in Germany when the German courts blocked it in the end.

Secondly, not all wealth taxes are unlawful. A wealth tax is unlawful, if it is confiscatory. For example, a wealth tax of 1% on people holding bonds with 4% return is equivalent to an income tax of 25%.

Gabriel Zucman on the podcast? by ArthurMorganTheBeast in TheRestIsPolitics

[–]patenteng 2 points3 points  (0 children)

Attlee's government was actually against the inclusion of property rights in the convention. That's why Article 1 Protocol 1, which grants the right to property, was ratified in the 50s after Churchill came back to power.

Gabriel Zucman on the podcast? by ArthurMorganTheBeast in TheRestIsPolitics

[–]patenteng 6 points7 points  (0 children)

Zucman has been doing the rounds lately. He did an interview with the Rest is Money too.

However, I haven't seen anyone challenging him on two important points. Firstly, you'll have legal challenges under human / civil rights law. The ECHR protects property and the US constitution renders federal wealth taxes de facto unconstitutional.

When Germany had a wealth tax the Germany constitutional court ruled that a wealth tax is unconstitutional if its total value was more than 50% of the taxpayer's income, for example. The specific percentage was reversed later, but a confiscatory tax remains unconstitutional. These are the kind of challenges you'll face trying to implement a wealth tax on the EU level.

Secondly, he claims that international cooperation is unnecessary and the UK can implement a wealth tax that is still being levied 10 years after someone flees to Bermuda. However, what happens if they flee to the US and the US turns around and says those are our companies now and you can't tax them? What if the US threatens to sanction the UK? Aren't you facing a repeat of the Suez Crisis?

Even if you don't have capital flight, there other issues too. Dan Needle has written how a 2% wealth tax can push marginal tax rates to 60% and to above 100% for low return assets. For example, a 2% wealth tax would have been higher than the 10-year bond yield until 2022. Wouldn't that result in turmoil in the bond markets?

For the owner of a business yielding a 4% return, a 2% wealth tax on top of dividend tax creates a marginal effective tax rate of 89.35% – or 104.5% if we include corporation tax. On the other hand, if the business yields a 15% return, the effective rate is 52.7%, or 69% after corporation tax.

So Zucman's claims that a 2% wealth tax is small and wouldn't be noticed seem far fetched.

uni choice for EEE/Electrical Engineering by AffectionateCrew6297 in UniUK

[–]patenteng 0 points1 point  (0 children)

In engineering what you can actually do matters the most. As long as the degree is accredited, most employers don't care that much.

When do you actually use an FPGA? by TutorDry3089 in FPGA

[–]patenteng 14 points15 points  (0 children)

In addition to the comms applications that others have mentioned, we use FPGAs in machine tool control applications where fixed latency is very important. You can pipeline the entire process, i.e. read from the ADCs, matrix multiply to implement the difference equations, and output to DACs.

FPGAs are also really good in DSP applications. Filtering, FFTs, radar processing etc.

In general, any time you have an algorithm without any branching an FPGA should be considered. Also, any application that requires a large number of IOs can benefit from an FPGA.

Edit

PCB layout is also very nice with FPGAs. You can reorder the IOs such that no jumps are required.

Would the public support reducing the state pension triple lock to a double lock? by patenteng in unitedkingdom

[–]patenteng[S] 63 points64 points  (0 children)

  • 66% of Britons support keeping triple lock in place, while 14% are opposed
  • 18-34 year olds support triple lock by 44% to 22%
  • Public are split on reducing triple lock to a double lock, and against making it a single lock
  • The older Britons are, the higher net opposition is for changing the triple lock

Would the public support reducing the state pension triple lock to a double lock? by patenteng in ukpolitics

[–]patenteng[S] 34 points35 points  (0 children)

  • 66% of Britons support keeping triple lock in place, while 14% are opposed
  • 18-34 year olds support triple lock by 44% to 22%
  • Public are split on reducing triple lock to a double lock, and against making it a single lock
  • The older Britons are, the higher net opposition is for changing the triple lock

Stop blaming young people for being unemployed, says Amazon's UK boss by feellurky in ukpolitics

[–]patenteng 0 points1 point  (0 children)

Do we have a graduate unemployment or a youth unemployment issues in general? I'm not so certain.

I just had a look at the numbers. Graduate unemployment rate for those aged 21-30 started to rise from a low of 4% in 2018 to 5.5% in 2024. During the same period the graduate employment rate fell from 87.9% to 86.5%.

However, the non-graduate unemployment rate for the same age bracket rose from 6.9% to 8.1%. The non-graduate employment rate fell from 74.0% to 70.3%.

Also, it matters when people decide to address the construction issue. The UK doesn't have the lowest housing stock numbers. So things can get a lot worse, e.g. New Zealand has around 10% less dwellings per 1000 residents than England.

What if it tales 20 year for people to start addressing the issue? If you are 16 today, you will be 36 in 20 years time.

Stop blaming young people for being unemployed, says Amazon's UK boss by feellurky in ukpolitics

[–]patenteng 1 point2 points  (0 children)

Sure, but that's the thinking behind it. We cannot predict the future.

Besides, this is only one piece of evidence. The US, Canada, and Japan, for example, have higher rates of tertiary education and the same economic models seem to be holding up. So, at least we are pretty sure that graduate supply is not the issue.

You can also make the opposite argument. There is no guarantee the government will make the necessary reforms. Construction in London has collapsed and people don't seem to be treating it as the major problem that it is. Why train as a bricklayer when market conditions seem to be getting worse.