Field code to display equation numbers in Word - ms-word

I am trying to write an article with some equations in Word; however, I encountered trouble related to displaying equation number with field code.
For example, I put a+b with the tool of Insert an Equation and insert the reference number just after the pound key with Caption tool.
To refer to this equation, I put the field code by using the Insert Cross-referencing tool.
However, even though I choose only label and number, Word shows the equation's entire, including both equation number and equation itself.
captured image (I just put the imgur link because I could not upload the captured image due to less reputation)
What I need is to display only the equation number.
Does anyone know how to solve this problem?

Related

How do I stop a spread sheet from auto correcting to a date?

I want to turn off auto-correcting to dates. I have been using spreadsheets for years and never, not once, have I ever used or wanted a date. I want the cell to compute an equation. I want to put in =3/12, or =6/12, or =9/12 equations and have it return an answer of .25, 0.5, or .75 instead of an auto-corrected date. I do not want to use ' because it will keep the fraction text instead of returning an answer from the equation, it would be the same thing if I changed the cell to text, it will no longer calculate an equation. I have put an equal sign in front because that is usually how you indicate that you want it to be an equation, but it still changes the equations to dates. Other equations work and when I put these fractions inside of other equations they work, but they do not work as stand-alone equations, neither does =90/3 or any other. They all get turned into dates and I need them to be used as equations. And yes, I need to be using a spreadsheet and yes, I want to use Open Office. I just want to know how to get it to do what I want it to do. Please Help. I have seen other forums on this topic and many arguments have ensued for no good reason. I just need help with this one simple thing, thank you.

Can automatically enumerate figures or keep tokens in matlab?

In a live script in matlab, I plot multiple figures, and I use this code to enumerate the figures:
FigureQuantity=1
plot(data_1)
title('Figure '+string(FigureQuantity))
Then on another code section I do it again
FigureQuantity=FigureQuantity+1
plot(data_n)
title('Figure '+string(FigureQuantity))
The problem is that if I run the last code section again, FigureQuantity gets updated and the enumeration of figures gets broken.
There is any way to get the number of tokens ordered by his code appearance on the live script? (independent of how many times the section code is run)
I would like to keep tokens so I can mix inserted images and plots. And I want to export the document as PDF (not to show plots in an application or an independent window).
What I need is something like MS Word enumeration of figures and tables.
I found this Matlab documentation: Number Section Headings, Table Titles, and Figure Captions Programmatically, but it appears to be used for creation of MS Word or HTML documents, and not to enumerate images on Matlab live scripts.
I do not understand how to use it, or if that is his purpose on Matlab.
I'm assuming you're updating the data_n variable live as well; otherwise, if you're defining these variables manually then not doing so for the figure variables isn't really the solution I think you're looking for.
Why not for-loop through the figure updates?
for FigureQuantity = 1:numberOfFigureQuantities
figure(FigureQuantity);
hold on;
plot(data_n(FigureQuantity))
title(strcat('Figure Number: ',num2str(FigureQuantity)));
end
The figure count corresponding to the FigureQuantity will index the appropriate figure and will update that figure if it already existed. This is the solution I think you're looking for; if not, please clarify.

How to separate very close characters in binary image for OCR in matlab? [duplicate]

This question already has an answer here:
What is the typical method to separate connected letters in a word using OCR
(1 answer)
Closed 5 years ago.
I made a basic OCR system in Matlab using correlation. (It's not a professional project, only as an exercise and I am not using the ocr() function of Matlab). My code is working almost correctly for clean text images. But if I make the job a little harder (taking the text photo for side position with angle) my code does not give good results. I use Principal Component Analysis for correct text alignment, but if I do this (taking photo with angle), the characters are very close together and I can't separate them for the recognizing process.
Original Image and after preprocessing (adaptive thresholding, adjusting,PCA)
How can I separate the characters correctly?
An alternative to what Yves suggests is to erode the image. Which is implemented as imerode in matlab. Perhaps scale the image first (though it is not needed here)
e.g. with this code
ocr(imerode(I,strel('disk',3)))
where I is your "BOOLEAN" black-white image, I receive
ocrText with properties:
Text: 'BOOLEAN↵↵'
CharacterBoundingBoxes: [9×4 double]
CharacterConfidences: [9×1 single]
Words: {'BOOLEAN'}
WordBoundingBoxes: [14 36 208 43]
WordConfidences: 0.5477
Splitting characters is a pretty difficult problem.
Unless the character widths are constant (which is the case for this image but might not be true with other letters), the methods based on projection analysis (vertcial extent of the characters as a function of abscissa) will fail.
Actually, for a method to be effective, it must be font-aware, i.e. know in advance what the alphabet looks like. In other words, you can't separate segmentation from recognition.
A possibility is to attempt to decompose the blob assumed to be made of touching characters (possibly based on projections or known character sizes), perform the recognition, and check the recognition results. Preferably, try several decompositions and keep the best.

How to generate an array of values in Simulink with varying max Limit

I feel that its really a dumb question to be even posted on forums. but i couldn't figure out the solution for simple problem which i am facing.
The Problem is I need to generate an array of values say [1:20] (or) [1:45] (or) [1:n] (or) even zeros(1,n) in SIMULINK ,so this n varies for every time step (using discrete mode simulation)... I am getting this "n" within each timestep in simulink model.
How would I get these values on simulink ?

Colored table in Matlab

I am trying to figure out how to generate a colored chart on a matlab, like the one you can find in here on page 9. (You will have to look through it to find what I am referring to - Stackoverflow doesn't allow me to post pictures in the postings just yet.)
A few questions:
I do have the table, but my table is a set of discreet points, not a continuous spectrum. So... can I do it in the first place?
If it IS possible, how would I do it?
(By the way, that table is from combat simulation for Risk - I am doing the combat simulation for Risk II, just for fun.)
The type of image you are looking for, as can be seen on Page 9, is a imagesc plot. Here's a simple example, using a double sin function. Done without vectorization for simplicity.
x=0:pi/180:pi;
y=0:pi/180:pi;
output=zeros(length(x),length(y));
for ix=1:length(x)
for iy=1:length(x)
output(ix,iy)=sin(x(ix)*2)*cos(y(iy)*4);
end
end
figure;imagesc(x,y,output)
I think you're looking for the filled contourplot.
See also: http://www.mathworks.nl/help/techdoc/ref/contourf.html