Ecuaciones Mostrar en Menu Matlab -- matlab campo con menu campo con equation camp Relacionados El problema

Equations show in menu MATLAB


1
vote

problema

Español

Estoy teniendo problemas para imprimir una ecuación matemática en el menú.

Aquí está mi código:

  {% extends 'base.html' %} {% block title %}Home{% endblock title %} {% block body %} <div class="container-fluid my-4 px-0"> <div id="carouselExampleCaptions" class="carousel slide" data-bs-ride="carousel">   <ol class="carousel-indicators">     <li data-bs-target="#carouselExampleCaptions" data-bs-slide-to="0" class="active"></li>     <li data-bs-target="#carouselExampleCaptions" data-bs-slide-to="1"></li>     <li data-bs-target="#carouselExampleCaptions" data-bs-slide-to="2"></li>   </ol>   <div class="carousel-inner">     <div class="carousel-item active">       {% comment %} <img src="https://source.unsplash.com/1600x600/?icecream" class="d-block w-100" alt="..."> {% endcomment %}         <img src="/static/img/1.jfif" class="d-block w-100" alt="...">       <div class="carousel-caption d-none d-md-block">         <h5>Chocolate Cookie Dough</h5>         <p>This is warm treat cookies ice cream - vanilla. It's the perfect mixture of two desserts that customers already love. </p>       </div>     </div>     <div class="carousel-item">       {% comment %} <img src="https://source.unsplash.com/1600x600/?icecreams" class="d-block w-100" alt="..."> {% endcomment %}       <img src="/static/img/2.jfif" class="d-block w-100" alt="...">       <div class="carousel-caption d-none d-md-block">         <h5>Moose Tracks</h5>         <p>This fun treat has a lot of chunks! It's vanilla ice cream, peanut butter cups, and fudge. It's a new perspective for vanilla ice cream.</p>       </div>     </div>     <div class="carousel-item">       {% comment %} <img src="https://source.unsplash.com/1600x600/?cakes" class="d-block w-100" alt="..."> {% endcomment %}       <img src="/static/img/3.jfif" class="d-block w-100" alt="...">       <div class="carousel-caption d-none d-md-block">         <h5>Chocolate Frosted Doughnut</h5>         <p>Covered with chocolate layer and sprinkles, this doughnut is definitely for chocolate lovers.</p>       </div>     </div>   </div>   <a class="carousel-control-prev" href="#carouselExampleCaptions" role="button" data-bs-slide="prev">     <span class="carousel-control-prev-icon" aria-hidden="true"></span>     <span class="visually-hidden">Previous</span>   </a>   <a class="carousel-control-next" href="#carouselExampleCaptions" role="button" data-bs-slide="next">     <span class="carousel-control-next-icon" aria-hidden="true"></span>     <span class="visually-hidden">Next</span>   </a> </div> </div>  <div class="container my-3"> <h1 class="my-4 text-center">Select from our range of Ice Creams</h1>       <div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 g-3">         <div class="col">           <div class="card shadow-sm">             <img src="/static/img/4.jfif" class="d-block w-100" alt="..." width="900" height="400">             <div class="card-body">               <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>               <div class="d-flex justify-content-between align-items-center">                 <div class="btn-group">                   <button type="button" class="btn btn-sm btn-outline-secondary">View</button>                   <button type="button" class="btn btn-sm btn-outline-secondary">Edit</button>                 </div>                 <small class="text-muted">9 mins</small>               </div>             </div>           </div>         </div>         <div class="col">           <div class="card shadow-sm">             <img src="/static/img/5.jfif" class="d-block w-100" alt="..." width="900" height="400">             <div class="card-body">               <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>               <div class="d-flex justify-content-between align-items-center">                 <div class="btn-group">                   <button type="button" class="btn btn-sm btn-outline-secondary">View</button>                   <button type="button" class="btn btn-sm btn-outline-secondary">Edit</button>                 </div>                 <small class="text-muted">9 mins</small>               </div>             </div>           </div>         </div>         <div class="col">           <div class="card shadow-sm">             <img src="/static/img/6.jfif" class="d-block w-100" alt="..." width="900" height="400">             <div class="card-body">               <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>               <div class="d-flex justify-content-between align-items-center">                 <div class="btn-group">                   <button type="button" class="btn btn-sm btn-outline-secondary">View</button>                   <button type="button" class="btn btn-sm btn-outline-secondary">Edit</button>                 </div>                 <small class="text-muted">9 mins</small>               </div>             </div>           </div>         </div>          <div class="col">           <div class="card shadow-sm">             <img src="/static/img/7.jfif" class="d-block w-100" alt="..." width="900" height="400">             <div class="card-body">               <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>               <div class="d-flex justify-content-between align-items-center">                 <div class="btn-group">                   <button type="button" class="btn btn-sm btn-outline-secondary">View</button>                   <button type="button" class="btn btn-sm btn-outline-secondary">Edit</button>                 </div>                 <small class="text-muted">9 mins</small>               </div>             </div>           </div>         </div>         <div class="col">           <div class="card shadow-sm">             <img src="/static/img/8.jfif" class="d-block w-100" alt="..." width="900" height="400">             <div class="card-body">               <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>               <div class="d-flex justify-content-between align-items-center">                 <div class="btn-group">                   <button type="button" class="btn btn-sm btn-outline-secondary">View</button>                   <button type="button" class="btn btn-sm btn-outline-secondary">Edit</button>                 </div>                 <small class="text-muted">9 mins</small>               </div>             </div>           </div>         </div>         <div class="col">           <div class="card shadow-sm">             <img src="/static/img/9.jfif" class="d-block w-100" alt="..." width="900" height="400">             <div class="card-body">               <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>               <div class="d-flex justify-content-between align-items-center">                 <div class="btn-group">                   <button type="button" class="btn btn-sm btn-outline-secondary">View</button>                   <button type="button" class="btn btn-sm btn-outline-secondary">Edit</button>                 </div>                 <small class="text-muted">9 mins</small>               </div>             </div>           </div>         </div>          <div class="col">           <div class="card shadow-sm">             <img src="/static/img/10.jfif" class="d-block w-100" alt="..." width="900" height="400">             <div class="card-body">               <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>               <div class="d-flex justify-content-between align-items-center">                 <div class="btn-group">                   <button type="button" class="btn btn-sm btn-outline-secondary">View</button>                   <button type="button" class="btn btn-sm btn-outline-secondary">Edit</button>                 </div>                 <small class="text-muted">9 mins</small>               </div>             </div>           </div>         </div>         <div class="col">           <div class="card shadow-sm">            <img src="/static/img/11.jfif" class="d-block w-100" alt="..." width="900" height="400">             <div class="card-body">               <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>               <div class="d-flex justify-content-between align-items-center">                 <div class="btn-group">                   <button type="button" class="btn btn-sm btn-outline-secondary">View</button>                   <button type="button" class="btn btn-sm btn-outline-secondary">Edit</button>                 </div>                 <small class="text-muted">9 mins</small>               </div>             </div>           </div>         </div>         <div class="col">           <div class="card shadow-sm">             <img src="/static/img/12.jfif" class="d-block w-100" alt="..." width="900" height="400">             <div class="card-body">               <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>               <div class="d-flex justify-content-between align-items-center">                 <div class="btn-group">                   <button type="button" class="btn btn-sm btn-outline-secondary">View</button>                   <button type="button" class="btn btn-sm btn-outline-secondary">Edit</button>                 </div>                 <small class="text-muted">9 mins</small>               </div>             </div>           </div>         </div>       </div>     </div>  {% endblock body %} 4  

y estas son las ecuaciones que me gustaría imprimir:

  {% extends 'base.html' %} {% block title %}Home{% endblock title %} {% block body %} <div class="container-fluid my-4 px-0"> <div id="carouselExampleCaptions" class="carousel slide" data-bs-ride="carousel">   <ol class="carousel-indicators">     <li data-bs-target="#carouselExampleCaptions" data-bs-slide-to="0" class="active"></li>     <li data-bs-target="#carouselExampleCaptions" data-bs-slide-to="1"></li>     <li data-bs-target="#carouselExampleCaptions" data-bs-slide-to="2"></li>   </ol>   <div class="carousel-inner">     <div class="carousel-item active">       {% comment %} <img src="https://source.unsplash.com/1600x600/?icecream" class="d-block w-100" alt="..."> {% endcomment %}         <img src="/static/img/1.jfif" class="d-block w-100" alt="...">       <div class="carousel-caption d-none d-md-block">         <h5>Chocolate Cookie Dough</h5>         <p>This is warm treat cookies ice cream - vanilla. It's the perfect mixture of two desserts that customers already love. </p>       </div>     </div>     <div class="carousel-item">       {% comment %} <img src="https://source.unsplash.com/1600x600/?icecreams" class="d-block w-100" alt="..."> {% endcomment %}       <img src="/static/img/2.jfif" class="d-block w-100" alt="...">       <div class="carousel-caption d-none d-md-block">         <h5>Moose Tracks</h5>         <p>This fun treat has a lot of chunks! It's vanilla ice cream, peanut butter cups, and fudge. It's a new perspective for vanilla ice cream.</p>       </div>     </div>     <div class="carousel-item">       {% comment %} <img src="https://source.unsplash.com/1600x600/?cakes" class="d-block w-100" alt="..."> {% endcomment %}       <img src="/static/img/3.jfif" class="d-block w-100" alt="...">       <div class="carousel-caption d-none d-md-block">         <h5>Chocolate Frosted Doughnut</h5>         <p>Covered with chocolate layer and sprinkles, this doughnut is definitely for chocolate lovers.</p>       </div>     </div>   </div>   <a class="carousel-control-prev" href="#carouselExampleCaptions" role="button" data-bs-slide="prev">     <span class="carousel-control-prev-icon" aria-hidden="true"></span>     <span class="visually-hidden">Previous</span>   </a>   <a class="carousel-control-next" href="#carouselExampleCaptions" role="button" data-bs-slide="next">     <span class="carousel-control-next-icon" aria-hidden="true"></span>     <span class="visually-hidden">Next</span>   </a> </div> </div>  <div class="container my-3"> <h1 class="my-4 text-center">Select from our range of Ice Creams</h1>       <div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 g-3">         <div class="col">           <div class="card shadow-sm">             <img src="/static/img/4.jfif" class="d-block w-100" alt="..." width="900" height="400">             <div class="card-body">               <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>               <div class="d-flex justify-content-between align-items-center">                 <div class="btn-group">                   <button type="button" class="btn btn-sm btn-outline-secondary">View</button>                   <button type="button" class="btn btn-sm btn-outline-secondary">Edit</button>                 </div>                 <small class="text-muted">9 mins</small>               </div>             </div>           </div>         </div>         <div class="col">           <div class="card shadow-sm">             <img src="/static/img/5.jfif" class="d-block w-100" alt="..." width="900" height="400">             <div class="card-body">               <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>               <div class="d-flex justify-content-between align-items-center">                 <div class="btn-group">                   <button type="button" class="btn btn-sm btn-outline-secondary">View</button>                   <button type="button" class="btn btn-sm btn-outline-secondary">Edit</button>                 </div>                 <small class="text-muted">9 mins</small>               </div>             </div>           </div>         </div>         <div class="col">           <div class="card shadow-sm">             <img src="/static/img/6.jfif" class="d-block w-100" alt="..." width="900" height="400">             <div class="card-body">               <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>               <div class="d-flex justify-content-between align-items-center">                 <div class="btn-group">                   <button type="button" class="btn btn-sm btn-outline-secondary">View</button>                   <button type="button" class="btn btn-sm btn-outline-secondary">Edit</button>                 </div>                 <small class="text-muted">9 mins</small>               </div>             </div>           </div>         </div>          <div class="col">           <div class="card shadow-sm">             <img src="/static/img/7.jfif" class="d-block w-100" alt="..." width="900" height="400">             <div class="card-body">               <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>               <div class="d-flex justify-content-between align-items-center">                 <div class="btn-group">                   <button type="button" class="btn btn-sm btn-outline-secondary">View</button>                   <button type="button" class="btn btn-sm btn-outline-secondary">Edit</button>                 </div>                 <small class="text-muted">9 mins</small>               </div>             </div>           </div>         </div>         <div class="col">           <div class="card shadow-sm">             <img src="/static/img/8.jfif" class="d-block w-100" alt="..." width="900" height="400">             <div class="card-body">               <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>               <div class="d-flex justify-content-between align-items-center">                 <div class="btn-group">                   <button type="button" class="btn btn-sm btn-outline-secondary">View</button>                   <button type="button" class="btn btn-sm btn-outline-secondary">Edit</button>                 </div>                 <small class="text-muted">9 mins</small>               </div>             </div>           </div>         </div>         <div class="col">           <div class="card shadow-sm">             <img src="/static/img/9.jfif" class="d-block w-100" alt="..." width="900" height="400">             <div class="card-body">               <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>               <div class="d-flex justify-content-between align-items-center">                 <div class="btn-group">                   <button type="button" class="btn btn-sm btn-outline-secondary">View</button>                   <button type="button" class="btn btn-sm btn-outline-secondary">Edit</button>                 </div>                 <small class="text-muted">9 mins</small>               </div>             </div>           </div>         </div>          <div class="col">           <div class="card shadow-sm">             <img src="/static/img/10.jfif" class="d-block w-100" alt="..." width="900" height="400">             <div class="card-body">               <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>               <div class="d-flex justify-content-between align-items-center">                 <div class="btn-group">                   <button type="button" class="btn btn-sm btn-outline-secondary">View</button>                   <button type="button" class="btn btn-sm btn-outline-secondary">Edit</button>                 </div>                 <small class="text-muted">9 mins</small>               </div>             </div>           </div>         </div>         <div class="col">           <div class="card shadow-sm">            <img src="/static/img/11.jfif" class="d-block w-100" alt="..." width="900" height="400">             <div class="card-body">               <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>               <div class="d-flex justify-content-between align-items-center">                 <div class="btn-group">                   <button type="button" class="btn btn-sm btn-outline-secondary">View</button>                   <button type="button" class="btn btn-sm btn-outline-secondary">Edit</button>                 </div>                 <small class="text-muted">9 mins</small>               </div>             </div>           </div>         </div>         <div class="col">           <div class="card shadow-sm">             <img src="/static/img/12.jfif" class="d-block w-100" alt="..." width="900" height="400">             <div class="card-body">               <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>               <div class="d-flex justify-content-between align-items-center">                 <div class="btn-group">                   <button type="button" class="btn btn-sm btn-outline-secondary">View</button>                   <button type="button" class="btn btn-sm btn-outline-secondary">Edit</button>                 </div>                 <small class="text-muted">9 mins</small>               </div>             </div>           </div>         </div>       </div>     </div>  {% endblock body %} 5  

¿Alguna idea de cómo hacer esto? Gracias.

Original en ingles

I'm having trouble printing a mathematical equation in menu.

Here's my code:

    choice = menu("I want to print equation here", 'Plot trajectory',     'Calculate acceleration'); 

And these are the equations that I would like to print:

x = 3*t - t^3 y = 4*t^2 

Any idea how to do this? Thank you.

        
 
 

Lista de respuestas

1
 
vote

Visualización de ecuaciones en Matlab Menus

Ecuaciones en los cuadros de diálogos del menú

Método 1: Uso de las variaciones de Unicode

No es la forma mejor o más reproducible de hacerlo, sino pegar los superíndices directamente en la cadena funciona para escribir las ecuaciones en el cuadro de diálogo Menú. Para un descanso de línea, el término newline se puede concatenar entre las dos cadenas.

  choice = menu(("x = 3t - t³" + newline + "y = 4t²"), 'Plot trajectory','Calculate acceleration');   

Método 2: Mantener los operadores Representaciones simbólicas

Una forma alternativa de crear una línea de salida es usar el término newline8 y para analizar los datos como una cadena usando sprint()

  $entity = new PossibleDuplicatedEntity();  try {    $em->persist($entity);    $em->flush(); } catch (DoctrineDBALExceptionUniqueConstraintViolationException $e) {     // handle duplicated values } 0  

corrió usando matlab r2019b

 

Displaying Equations in MATLAB Menus

Equations in Menu Dialogs

Method 1: Using Unicode Variations

Not the best or most reproducible way of doing it but pasting the superscripts directly into the string works to write the equations in the menu dialog. For a line break, the term newline can be concatenated between the two strings.

choice = menu(("x = 3t - txc2xb3" + newline + "y = 4txc2xb2"), 'Plot trajectory','Calculate acceleration'); 

Method 2: Keeping Operators Symbolic Representations

An alternative way to create a line break is to use the \n term and to parse the data as a string using sprint()

choice = menu(sprintf("x = 3*t - t^3\ny = 4*t^2"), 'Plot trajectory','Calculate acceleration'); 

Ran using MATLAB R2019b

 
 

Relacionados problema

8  Misma ecuación, diferentes respuestas de pilab y octava  ( Same equation different answers from pylab and octave ) 
Estoy creado el código de porting en Octave en Pylab. Una de las ecuaciones portadas da resultados dramáticamente diferentes en Python que en octava. La mej...

0  ¿Cómo encajar el punto más cercano a una ecuación? Pitón  ( How to fit closest point to an equation python ) 
Básicamente, tengo algún código para el cual encontrará la ecuación de un plano y luego intentará colocar una lista 1 en una lista si un punto satisface esta ...

5  Ecuaciones de transferencia de impulso angular  ( Angular momentum transfer equations ) 
¿Alguien tiene alguna buena referencias para ecuaciones que pueden implementarse con relativa facilidad para cómo calcular la transferencia de impulso angular...

0  Python - Curva de ajuste de función más compleja  ( Python curve fitting of more complex function ) 
Deseo encontrar la ecuación de la curva del mejor ajuste del siguiente gráfico: que tiene la ecuación en la forma de: He intentado encontrar ejemplos...

0  Problemas con una ecuación en java  ( Trouble with a equation in java ) 
Actualmente estoy trabajando en un juego de 15 rompecabezas para Android para la escuela. Lamentablemente he corrido un problema. Necesito reescribir esta e...

2  Cálculo de la trayectoria balística con condiciones cambiantes durante el vuelo  ( Calculating ballistic trajectory with changing conditions during flight ) 
Hay una buena compilación de matemáticas de trayectoria en wikipedia . Pero necesito calcular una trayectoria que tiene condiciones no uniformes. P.ej. La ...

-1  ¿Usando una ecuación como variable? [cerrado]  ( Using an equation as a variable ) 
cerrado . Esta pregunta debe ser más enfocado . Actualmente no está aceptando respuestas. ...

20  Calcule la posición de un cuerpo acelerado después de un cierto tiempo [cerrado]  ( Calculate the position of an accelerating body after a certain time ) 
cerrado. Esta pregunta no cumple con pautas de desbordamiento de pila . Actualmente no está aceptando respuestas. ...

0  Cómo resolver la ecuación cuando el desconocido no se puede colocar por separado  ( How to solve equation when the unknown cannot be placed separately ) 
¿Podría alguien decirme cómo resolver este tipo de ecuaciones para un desconocido que no se podría separar de las otras variables! L_1=(D/f)*(((1- M**2)/(g...

1  Crea Grid fuera de número de elementos  ( Create grid out of number of elements ) 
OK, aquí está lo que estoy tratando de lograr. Di que tengo 100 artículos. Quiero crear una "cuadrícula" (cada artículo que consiste en un punto x, y). Quiero...




© 2022 respuesta.top Reservados todos los derechos. Centro de preguntas y respuestas reservados todos los derechos