BESSELK function
PRO
BASIC
The BESSELK
function in Jspreadsheet Formulas Pro is a mathematical tool that calculates the modified Bessel function of the second kind, represented as K(x), based on a number you provide. This number can be either real or complex. This function is particularly useful in advanced mathematical calculations relating to wave patterns, heat conduction, and other physical phenomena. It's a powerful tool for those needing to perform complex mathematical operations in their spreadsheets.
Documentation
Returns the modified Bessel function of the second kind, Kâ(x)
, for a specified value x and order n.
Category
Engineering
Syntax
BESSELK(x, n)
Parameter | Description |
---|---|
x |
The real or complex number for which to calculate the modified Bessel function. |
n |
The order of the Bessel function. Must be a nonnegative integer or a real number greater than -1. |
Behavior
The BESSELK
function computes the modified Bessel function Kâ(x)
. It requires two arguments: x and n. x is the value at which the function is to be evaluated and n is the order of the function.
- If the given cell is empty,
BESSELK
will treat it as zero. - The function does not accept text. If a text string is given as an argument, it will return a
#VALUE!
error. - It handles boolean values where TRUE is interpreted as 1 and FALSE as 0.
- If either of the arguments are non-numeric,
BESSELK
returns a#VALUE!
error. - If the argument x is negative,
BESSELK
returns a#NUM!
error. - If the argument n is not an integer,
BESSELK
will truncate it to an integer.
Common Errors
Error | Description |
---|---|
#VALUE! |
This error is returned when either of the arguments are non-numeric or are given as text strings. |
#NUM! |
This error is returned when the argument x is negative. |
Best practices
- Always ensure that both arguments are numeric. Text or non-numeric values will result in a
#VALUE!
error.- Be careful when using cell references or formulas for the order argument n. If the result is not an integer,
BESSELK
function will truncate it to an integer.- Use error handling functions like
IFERROR
to handle possible errors and prevent your spreadsheet from breaking.- Remember that
BESSELK
function treats empty cells as zero. Make sure to provide all required inputs.
Usage
A few examples using the BESSELK function.
BESSELK(3, 2) // Computes the modified Bessel function at x = 3, order 2
BESSELK(1+2i, 0) // Evaluates for a complex input
Interactive Spreadsheet Demo
<html>
<script src="https://jspreadsheet.com/v11/jspreadsheet.js"></script>
<script src="https://jsuites.net/v5/jsuites.js"></script>
<link rel="stylesheet" href="https://jsuites.net/v5/jsuites.css" type="text/css" />
<link rel="stylesheet" href="https://jspreadsheet.com/v11/jspreadsheet.css" type="text/css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons" />
<script src="https://cdn.jsdelivr.net/npm/@jspreadsheet/formula-pro/dist/index.min.js"></script>
<div id="spreadsheet"></div>
<script>
// Set your JSS license key (The following key only works for one day)
jspreadsheet.setLicense('NDE3NmFiZTQ1M2RiZWRkMjMzZDhjM2MzY2FmY2IyZTMwNGJiM2NlMTBjOWNkNjQwYjgwNjk2MWM1NWYzMDQxMmZiYWE2ZmQ1YTE1NjI1MzFhOTIwMjgzZTcwOTQxZGMzODU5YjBjMWZiZDMwYWMxZmIxMGJhZmRiODNlNjAyYzIsZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpVM01ETXdOekF6TENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0p6ZEdGamEySnNhWFI2TG1sdklpd2lkMlZpWTI5dWRHRnBibVZ5TG1sdklpd2lkMlZpSWl3aWJHOWpZV3hvYjNOMElsMHNJbkJzWVc0aU9pSXpOQ0lzSW5OamIzQmxJanBiSW5ZM0lpd2lkamdpTENKMk9TSXNJbll4TUNJc0luWXhNU0lzSW1Ob1lYSjBjeUlzSW1admNtMXpJaXdpWm05eWJYVnNZU0lzSW5CaGNuTmxjaUlzSW5KbGJtUmxjaUlzSW1OdmJXMWxiblJ6SWl3aWFXMXdiM0owWlhJaUxDSmlZWElpTENKMllXeHBaR0YwYVc5dWN5SXNJbk5sWVhKamFDSXNJbkJ5YVc1MElpd2ljMmhsWlhSeklpd2lZMnhwWlc1MElpd2ljMlZ5ZG1WeUlpd2ljMmhoY0dWeklpd2labTl5YldGMElsMHNJbVJsYlc4aU9uUnlkV1Y5');
// Set the extensions
jspreadsheet.setExtensions({ formula });
// Create a new spreadsheet
jspreadsheet(document.getElementById('spreadsheet'), {
worksheets: [{
data: [
[
"x",
"n",
"BESSELK Result"
],
[
1.5,
0,
"=BESSELK(A2,B2)"
],
[
2.0,
1,
"=BESSELK(A3,B3)"
],
[
0.5,
2,
"=BESSELK(A4,B4)"
],
[
3.0,
1,
"=BESSELK(A5,B5)"
]
]
}]
});
</script>
</html>
import React, { useRef } from "react";
import { Spreadsheet, Worksheet, jspreadsheet } from "@jspreadsheet/react";
import formula from "@jspreadsheet/formula-pro";
import "jsuites/dist/jsuites.css";
import "jspreadsheet/dist/jspreadsheet.css";
// Set license
jspreadsheet.setLicense('NDE3NmFiZTQ1M2RiZWRkMjMzZDhjM2MzY2FmY2IyZTMwNGJiM2NlMTBjOWNkNjQwYjgwNjk2MWM1NWYzMDQxMmZiYWE2ZmQ1YTE1NjI1MzFhOTIwMjgzZTcwOTQxZGMzODU5YjBjMWZiZDMwYWMxZmIxMGJhZmRiODNlNjAyYzIsZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpVM01ETXdOekF6TENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0p6ZEdGamEySnNhWFI2TG1sdklpd2lkMlZpWTI5dWRHRnBibVZ5TG1sdklpd2lkMlZpSWl3aWJHOWpZV3hvYjNOMElsMHNJbkJzWVc0aU9pSXpOQ0lzSW5OamIzQmxJanBiSW5ZM0lpd2lkamdpTENKMk9TSXNJbll4TUNJc0luWXhNU0lzSW1Ob1lYSjBjeUlzSW1admNtMXpJaXdpWm05eWJYVnNZU0lzSW5CaGNuTmxjaUlzSW5KbGJtUmxjaUlzSW1OdmJXMWxiblJ6SWl3aWFXMXdiM0owWlhJaUxDSmlZWElpTENKMllXeHBaR0YwYVc5dWN5SXNJbk5sWVhKamFDSXNJbkJ5YVc1MElpd2ljMmhsWlhSeklpd2lZMnhwWlc1MElpd2ljMlZ5ZG1WeUlpd2ljMmhoY0dWeklpd2labTl5YldGMElsMHNJbVJsYlc4aU9uUnlkV1Y5');
// Set the extensions
jspreadsheet.setExtensions({ formula });
export default function App() {
// Spreadsheet array of worksheets
const spreadsheet = useRef();
// Worksheet data
const data = [
[
"x",
"n",
"BESSELK Result"
],
[
1.5,
0,
"=BESSELK(A2,B2)"
],
[
2.0,
1,
"=BESSELK(A3,B3)"
],
[
0.5,
2,
"=BESSELK(A4,B4)"
],
[
3.0,
1,
"=BESSELK(A5,B5)"
]
];
// Render component
return (
<Spreadsheet ref={spreadsheet}>
<Worksheet data={data} />
</Spreadsheet>
);
}
<template>
<Spreadsheet ref="spreadsheet">
<Worksheet :data="data" />
</Spreadsheet>
</template>
<script>
import { Spreadsheet, Worksheet, jspreadsheet } from "@jspreadsheet/vue";
import "jsuites/dist/jsuites.css";
import "jspreadsheet/dist/jspreadsheet.css";
import formula from "@jspreadsheet/formula-pro";
// Set license
jspreadsheet.setLicense('NDE3NmFiZTQ1M2RiZWRkMjMzZDhjM2MzY2FmY2IyZTMwNGJiM2NlMTBjOWNkNjQwYjgwNjk2MWM1NWYzMDQxMmZiYWE2ZmQ1YTE1NjI1MzFhOTIwMjgzZTcwOTQxZGMzODU5YjBjMWZiZDMwYWMxZmIxMGJhZmRiODNlNjAyYzIsZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpVM01ETXdOekF6TENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0p6ZEdGamEySnNhWFI2TG1sdklpd2lkMlZpWTI5dWRHRnBibVZ5TG1sdklpd2lkMlZpSWl3aWJHOWpZV3hvYjNOMElsMHNJbkJzWVc0aU9pSXpOQ0lzSW5OamIzQmxJanBiSW5ZM0lpd2lkamdpTENKMk9TSXNJbll4TUNJc0luWXhNU0lzSW1Ob1lYSjBjeUlzSW1admNtMXpJaXdpWm05eWJYVnNZU0lzSW5CaGNuTmxjaUlzSW5KbGJtUmxjaUlzSW1OdmJXMWxiblJ6SWl3aWFXMXdiM0owWlhJaUxDSmlZWElpTENKMllXeHBaR0YwYVc5dWN5SXNJbk5sWVhKamFDSXNJbkJ5YVc1MElpd2ljMmhsWlhSeklpd2lZMnhwWlc1MElpd2ljMlZ5ZG1WeUlpd2ljMmhoY0dWeklpd2labTl5YldGMElsMHNJbVJsYlc4aU9uUnlkV1Y5');
// Set the extensions
jspreadsheet.setExtensions({ formula });
export default {
components: {
Spreadsheet,
Worksheet,
},
data() {
// Worksheet data
const data = [
[
"x",
"n",
"BESSELK Result"
],
[
1.5,
0,
"=BESSELK(A2,B2)"
],
[
2.0,
1,
"=BESSELK(A3,B3)"
],
[
0.5,
2,
"=BESSELK(A4,B4)"
],
[
3.0,
1,
"=BESSELK(A5,B5)"
]
]
return {
data
};
}
}
</script>
import { Component, ViewChild, ElementRef } from "@angular/core";
import jspreadsheet from "jspreadsheet";
import * as formula from "@jspreadsheet/formula-pro";
// Set your JSS license key (The following key only works for one day)
jspreadsheet.setLicense('NDE3NmFiZTQ1M2RiZWRkMjMzZDhjM2MzY2FmY2IyZTMwNGJiM2NlMTBjOWNkNjQwYjgwNjk2MWM1NWYzMDQxMmZiYWE2ZmQ1YTE1NjI1MzFhOTIwMjgzZTcwOTQxZGMzODU5YjBjMWZiZDMwYWMxZmIxMGJhZmRiODNlNjAyYzIsZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpVM01ETXdOekF6TENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0p6ZEdGamEySnNhWFI2TG1sdklpd2lkMlZpWTI5dWRHRnBibVZ5TG1sdklpd2lkMlZpSWl3aWJHOWpZV3hvYjNOMElsMHNJbkJzWVc0aU9pSXpOQ0lzSW5OamIzQmxJanBiSW5ZM0lpd2lkamdpTENKMk9TSXNJbll4TUNJc0luWXhNU0lzSW1Ob1lYSjBjeUlzSW1admNtMXpJaXdpWm05eWJYVnNZU0lzSW5CaGNuTmxjaUlzSW5KbGJtUmxjaUlzSW1OdmJXMWxiblJ6SWl3aWFXMXdiM0owWlhJaUxDSmlZWElpTENKMllXeHBaR0YwYVc5dWN5SXNJbk5sWVhKamFDSXNJbkJ5YVc1MElpd2ljMmhsWlhSeklpd2lZMnhwWlc1MElpd2ljMlZ5ZG1WeUlpd2ljMmhoY0dWeklpd2labTl5YldGMElsMHNJbVJsYlc4aU9uUnlkV1Y5');
// Set the extensions
jspreadsheet.setExtensions({ formula });
@Component({
standalone: true,
selector: "app-root",
template: `<div #spreadsheet></div>`
})
export class AppComponent {
@ViewChild("spreadsheet") spreadsheet: ElementRef;
// Worksheets
worksheets: jspreadsheet.worksheetInstance[];
// Create a new data grid
ngAfterViewInit() {
// Create spreadsheet
this.worksheets = jspreadsheet(this.spreadsheet.nativeElement, {
worksheets: [{
data: [
[
"x",
"n",
"BESSELK Result"
],
[
1.5,
0,
"=BESSELK(A2,B2)"
],
[
2.0,
1,
"=BESSELK(A3,B3)"
],
[
0.5,
2,
"=BESSELK(A4,B4)"
],
[
3.0,
1,
"=BESSELK(A5,B5)"
]
]
}]
});
}
}