JevMade Sign in
← Back to guides

JevMade field notes / MATLAB worked example

Ask Jev about MATLAB code without asking it to write code

Mike Croucher shows MATLAB users how to ask Jev whether a loop could be replaced by an expression that works on many values at once.

Original by Mike CroucherIntegrations

Listen to this guide

JevMade’s plain-English explanation

0:00 /

AI narration

Credits

“Using Jev in MATLAB” by Mike Croucher. Read the original source.

This expanded guide is an AI-narrated adaptation prepared by JevMade. It expands the source’s essential ideas, examples and caveats in JevMade’s own words and is not a word-for-word reading. The synthetic voice does not imitate the author or imply their endorsement.

Our summary

MATLAB is software used for calculations and scientific work. Mike Croucher shows how it can ask Jev about a small piece of code. His question is whether a repeated calculation, called a loop, could become one expression that handles many values together.

He keeps the access key in MATLAB Vault, which stores secrets, and sends the examples with MATLAB's webwrite function. Jev returns a probability for each named question. The larger example asks about five pieces of code in one request, rather than sending five separate requests.

Jev does not write the replacement code or prove that a rewrite is correct. Croucher reports a 494-millisecond round trip for the five questions, not a general speed guarantee. The probability also changes when the surrounding examples change, so people still need to check any proposed rewrite.

Key takeaways

  1. Keep the access key in MATLAB Vault rather than putting it directly into shared code.
  2. Name each example and its question so the returned probability can be matched to the right code.
  3. Treat the answer as a judgment to investigate, not replacement code or proof that two calculations behave identically.

Introductory example, not a validated code-rewriting tool. Croucher reports the 494 ms timing; neither the requests nor the MATLAB examples were independently run. Jev judges the snippets, while the author supplies the replacement expression separately. A high probability does not prove that two calculations behave identically.

The MATLAB Blog, MathWorks · Original published

Read the original guide Opens the author’s site in a new tab.

Keep this for later

Sign in to bookmark experiments, guides and videos, and keep notes only you can see.

Continue to sign in

We’ll bring you back to this listing.