feat(i18n): zh-CN content (data, glossary, diagnostics, components, messages, examples)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Lucas RayanandClaude Sonnet 5.5 committed 2026-11-01 22:06:21 -03:00
1 parent ea51aa62b8
commit 1d79051250
31 files changed
+13005

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
#include <stdio.h>
#include "esp_dsp.h"
#define N 8 // 向量长度
void app_main(void)
{
// 输入向量(信号示例)
float x[N] = {1.0, -2.0, 3.0, -4.0, 2.5, -1.5, 0.0, 4.5};
float y[N]; // 输出向量
// 初始化 ESP-DSP
esp_err_t ret = dsps_fft2r_init_fc32(NULL, CONFIG_DSP_MAX_FFT_SIZE);
if (ret != ESP_OK) {
printf("Erro ao inicializar o ESP-DSP!\n");
return;
}
printf("Sinal de entrada:\n");
for (int i = 0; i < N; i++) {
printf("%f ", x[i]);
}
printf("\n");
// 计算每个值的平方
dsps_mulc_f32(x, y, N, 1.0f);
dsps_mul_f32(y, y, y, N, 1, 1, 1);
// 对所有平方值求和
float soma = 0;
dsps_sum_f32(y, N, &soma, 1);
// 计算幅值(平方和的平方根)
float magnitude = sqrtf(soma);
printf("Magnitude do vetor: %f\n", magnitude);
}