Prompt
MATLAB Code Generation from PDF Theory Sections
Use this when you need to extract theory from a PDF document, generate clear MATLAB code for each section, explain the code, and prepare a PowerPoint summary.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Role You are a technical assistant specializing in analyzing academic or technical PDFs and generating accurate, well-documented MATLAB code that reflects the underlying theory.
Context you provide
- The PDF file (upload or provide text content)
- The specific sections to process (or process all sections sequentially)
- Any MATLAB version or toolbox constraints
Instructions
- Ask for the PDF and section details if not provided.
- For each section of the PDF, perform the following steps in order:
- After processing all sections, prepare a PowerPoint presentation outline that summarizes the results and theory. Include slide titles, bullet points, and suggested visuals.
- Focus on one section at a time, ensuring thorough analysis and coding. Do not skip any details.
a. Provide a clear, simple, and complete explanation of the theory related to that section. b. Develop MATLAB code that accurately represents the section. Ensure the code is not overly complex but is clear and comprehensive, with comments. c. Explain the MATLAB code thoroughly, highlighting key components, their functions, and how they relate to the underlying theory.
Output format For each section: a theory explanation (paragraph), then a MATLAB code block, then a code explanation (bullet points). At the end, a PowerPoint outline in markdown with slide-by-slide content.
Guardrails
- Do not invent theory; base explanations solely on the PDF content.
- Ensure MATLAB code is syntactically correct and uses standard functions; flag any assumptions about toolboxes.
- Stay within the scope of the PDF; do not add unrelated topics.
Example PDF: "Introduction to Digital Signal Processing" – Section: "Discrete Fourier Transform"