I'm using Katex and need to reduce the size of the indices as they are far too big. I've figured out work arounds when the index is a simple number, but as soon as I need to use fractional indices, nothing works. I know I probably need to modify the index size in the javascript library but I don't know how. Does anyone out there know how to do it?
Related
I'm trying to assign the result of a chain matrix multiplication in Maxima to a new variable. I'm not sure as a new user why line %o6 isn't the same as the previous and fully evaluate the chain. Also why when I enter the new variable name "B" I simply have "B" returned back to me and not ([32, 32], [32, 32]). Basic questions I know but I've searched the documentation for a number of hours, and tutorials, and the syntax that I'm supposed to use here to get what I guess I was expecting as output, is still unclear to me.
I can't tell for sure, but it appears that the problem is that B : A.A.A is entered holding the shift key for at least one of the spaces, and Shift+Space is interpreted as non-breaking space instead of ordinary space. This appears to be a known bug or at least a serious misfeature in wxMaxima; see: https://github.com/wxMaxima-developers/wxmaxima/issues/1031
(I say misfeature because Shift+Space --> non-breaking space is documented in the wxMaxima documentation, but it seems like a classic example of "bad affordance"; it is all too easy to do the wrong thing without knowing it. Anyway this is just my opinion.)
I built wxMaxima from current source code and it appears that Shift+Space is now not interpreted as non-breaking space in code, so B : A.A.A should have the expected effect even if shift key is held while typing space. The current version is 19.07.0-DevelopmentSnapshot. I poked through the commit log a bit, but I can't figure out which commit changed the behavior of Shift+Space, so it's possible that the problem is not fixed and it is just fortuitous that I am not encountering it.
There are two workarounds, if one doesn't want to hazard an upgrade. (1) Omit spaces. (2) Be careful to only type space without shift.
Hope this is helpful in some way.
I am using BsplinesComp for a sample problem.
The objective is to maximize the area under the line.
My problem arises when I want to set a constraint for one of the values in the output array that bspline gives. So a value such that the spline goes through that no matter what configuration it is in.
I tried this in two ways and I have uploaded the codes. They are both very badly coded so i think there is a neater way to do so. Links to codes:
https://gist.github.com/stackoverflow38/5eae1e86c5802a4df91becdf580d28c5
1- Using an extra explicit component in which the middle array value is imposed to be a selected value
2- Tried to use an execcomp but I get an error. Target shapes do not match.
I vaguely remember reading such a question but could not find it.
Overall I am trying to set a constraint for either the first, middle or last value of the bspline and some range that it should be in.
Similar to the plots here
So, I think you want to know the best way to do this, and the best way is to not use any extra components at all. You can directly constrain a single point in the output of the BsplinesComp by using the "indices" argument in the add_constraint call. Here, I constrain the first point in the spline to lie on the interval [-1, 1].
model.add_constraint('interp.h', lower=-1, upper=1, indices=[0])
Running the model gives me a shape that looks more like one of the ones you included.
Just for reference, for the errors you got with 1 and 2:
Not sure what is wrong here, but maybe the version you uploaded isn't the latest. You never used the AeraComp in a constraint, so it didn't do anything.
The exception was due to a size mismatch in connecting the vector output of the Bsplines comp to a scaler expression. You can do this by specifying the "src_indices", giving it a list of which indices in the array to connect to the target. model.connect('interp.h', 'execcomp.x', src_indices=[0])
im trying to find an easy formula to do the following:
=IF(AND(H6="OK";H7="OK";H8="OK";H9="OK";H10="OK";H11="OK";);"OK";"X")
This actually works. But I want to apply to a range of cells within a column (H6:H11) instead of having to create a rule for each and every one of them... But trying as a range:
=IF(AND(H6:H11="OK";);"OK";"X")
Does not work.
Any insights?
Thanks.
=ArrayFormula(IF(AND(H6:H11="OK");"OK";"X"))
also works
arrayformulas work the same way they do in excel... they just need an ArrayFormula() around to work (will be automatically set when pressing Ctrl+Alt+Return like in excel)
In google sheets the formula is:
=ArrayFormula(IF(SUM(IF(H6:H11="OK";1;0))=6;"OK";"X"))
in excel:
=IF(SUM(IF(H6:H11="OK";1;0))=6;"OK";"X")
And confirm with Ctrl-Shift-Enter
This basically counts the number of times the said range is = to the criteria and compares it to the number it should be. So if the range is increased then increase the number 6 to accommodate.
This sounds like a silly question, but I really can't find an answer around.
I'm using Scilab to evaluate two methods in terms of performace. However, every time I tell Scilab to calculate anything, it will print the results. Since I'm using large matrices, it spends much more time printing the results than doing the calculations, so I'm having a hard time telling how long is each method actually taking.
Can I get Scilab to compute something without printing the result?
That is, instead of
-->B = A'*A
A =
1. 2. 3.
2. 4. 6.
3. 6. 9.
-->
I'd like it to do
-->B = A'*A
-->
Also simply adding a semicolon works
-->B = A'*A;
-->
Well, I finally found the right query. When I searched for 'scilab silent', one of the results (not the first) was this:
http://help.scilab.org/docs/5.3.3/en_US/mode.html
Function mode(k) lets you choose how Scilab will behave in terms of variable display. The following call will temporarily hide results:
mode(-1)
Whereas this will get you back to the default option:
mode(2)
The documentation is confusing, though.
Please notices that mode does not used at prompt, only in an exec-file or a scilab function.
Aside from the awful English, this notice seems to be outdated. This function worked perfectly for me on the prompt.
Today I had a little problem with excelphp.
I wanted to set the default width of the columns manually and only one single time.
I found a few solutions also here on stackoverflow which suggested to change the value for every single column (e.g. within a loop).
But I wanted to do it with a single command.
After browsing the source code I found out the following solution:
$phpExcelObject->getActiveSheet()->getDefaultColumnDimension()
->setWidth($myCustomWidth);
I hope that this helps anybody else ;)