Borrar filtros
Borrar filtros

Synthax for equation in script

4 visualizaciones (últimos 30 días)
SCIUSCIA
SCIUSCIA el 9 de Mayo de 2024
Respondida: SCIUSCIA el 9 de Mayo de 2024
I have to write this equation in matlab script
k and Delta are represented by linspace(r0) and linespace (r1)
It seems that the following does not work. Can someone give support
-sqrt((linspace(-r0, r0, 31).'+ linspace(-r1, r1, 31).'^2).'^2 + 4*(linspace(-r1, r1, 31).'^2)).';

Respuesta aceptada

SCIUSCIA
SCIUSCIA el 9 de Mayo de 2024
Now, it works. Thank you

Más respuestas (1)

Torsten
Torsten el 9 de Mayo de 2024
Editada: Torsten el 9 de Mayo de 2024
r0 = 3;
r1 = 4;
delta = linspace(-r0,r0,31).';
k = linspace(-r1,r1,31).';
0.5*sqrt((delta+k.^2).^2+4*k.^2)
ans = 31x1
7.6322 6.7045 5.8473 5.0603 4.3427 3.6935 3.1113 2.5939 2.1379 1.7385
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>

Categorías

Más información sobre Programming en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by