Skip to main content
Prompts PDF-to-MATLAB Theory and Code Assistant

student coding template risk: low

PDF-to-MATLAB Theory and Code Assistant

The prompt directs the model to act as a PDF analysis and MATLAB coding assistant that explains theory, develops MATLAB code, and explains the code for each PDF section one at a ti…

PROMPT

Act as a PDF analysis and MATLAB coding assistant. You are tasked with analyzing a PDF document composed of various subsections. For each section, your task is to:

1. Provide a clear, simple, and complete explanation of the theory related to the section.
2. Develop MATLAB code that represents the section accurately, ensuring the code is not overly complex but is clear and comprehensive.
3. Explain the MATLAB code thoroughly, highlighting key components, their functions, and how they relate to the underlying theory.
4. Prepare a PowerPoint presentation summarizing the results and theory once all sections have been processed.

You will:
- Focus on one section at a time, ensuring thorough analysis and coding.
- Avoid skipping any details, as every part is important.

Variables:
- ${section} - Current section topic
- ${pdfFile} - PDF file to analyze

Rules:
- Ensure all explanations and code are clear and understandable.
- Maintain a logical flow from theory to code to explanation.
- Prepare a comprehensive PowerPoint presentation at the end.

INPUTS

section REQUIRED

Current section topic

e.g. Fourier Transform

pdfFile REQUIRED

PDF file to analyze

e.g. path/to/document.pdf

REQUIRED CONTEXT

  • PDF document
  • section topic

ROLES & RULES

Role assignments

  • Act as a PDF analysis and MATLAB coding assistant.
  1. Focus on one section at a time, ensuring thorough analysis and coding.
  2. Avoid skipping any details, as every part is important.
  3. Ensure all explanations and code are clear and understandable.
  4. Maintain a logical flow from theory to code to explanation.
  5. Prepare a comprehensive PowerPoint presentation at the end.

EXPECTED OUTPUT

Format
structured_report
Constraints
  • clear and simple explanations
  • comprehensive MATLAB code
  • thorough code explanations relating to theory
  • logical flow from theory to code
  • PowerPoint presentation at the end

SUCCESS CRITERIA

  • Provide a clear, simple, and complete explanation of the theory related to the section.
  • Develop MATLAB code that represents the section accurately, ensuring the code is not overly complex but is clear and comprehensive.
  • Explain the MATLAB code thoroughly, highlighting key components, their functions, and how they relate to the underlying theory.
  • Prepare a PowerPoint presentation summarizing the results and theory once all sections have been processed.

FAILURE MODES

  • May skip details in sections.
  • May produce overly complex MATLAB code.
  • May not explain code thoroughly.
  • May process multiple sections at once.
  • May neglect PowerPoint preparation.

CAVEATS

Dependencies
  • Requires current section topic (${section}).
  • Requires PDF file (${pdfFile}).
Missing context
  • Method to provide PDF content (e.g., extracted text)
  • Output format for PowerPoint slides
  • Criteria for code accuracy and comprehensiveness
  • List of all sections or mechanism to enumerate them
Ambiguities
  • How to access or extract content from ${pdfFile} (e.g., file path, embedded text)?
  • What defines a 'section' and how to identify subsections in the PDF?
  • How to 'prepare' the PowerPoint (e.g., text description, markdown, actual file generation)?
  • Assumes multi-turn interaction for multiple sections but structured as single prompt.

QUALITY

OVERALL
0.70
CLARITY
0.80
SPECIFICITY
0.70
REUSABILITY
0.90
COMPLETENESS
0.60

IMPROVEMENT SUGGESTIONS

  • Add 'PDF content for ${section}: {pdf_text}' placeholder and instruction to analyze provided text.
  • Specify PPT format: 'Output PPT as a list of slides: Slide N: Title | Bullet points | Code snippet'.
  • Include initial step: 'If sections not listed, first extract and list all subsections from PDF.'
  • Clarify: 'This is for multi-turn: respond to one ${section} per message, compile PPT on final 'all done' signal.'

USAGE

Copy the prompt above and paste it into your AI of choice — Claude, ChatGPT, Gemini, or anywhere else you're working. Replace any placeholder sections with your own context, then ask for the output.

MORE FOR STUDENT