I have created an array that contains another array into it, but now I am struggling to get the data from it. Please see the image attached.
Imagine I would like to access the string in channelsData(1)(1,1)(0,0) so the first red crossed string. How can I call it in an If condition condition for example?
Thanks in advance.
To get the data is as #Rory suggested. channelsData(1,1)(0,0)
To get the dimension of the array at channelsData(1,1)(i) is UBound(channelsData(i, 1), 2)
Related
so I have a formula inside an array that looks like this
={CRYPTOFINANCE("kraken:"&ARL8&"/USD", "price_history", "10d")}
I want to auto fill the array with the same function but with the 'ARL8' reference in an ascending order, just like auto filling cells, but keep it all in one cell it should look like this...
={CRYPTOFINANCE("kraken:"&ARL8&"/USD", "price_history", "10d") ; CRYPTOFINANCE("kraken:"&ARL9&"/USD", "price_history", "10d") ; CRYPTOFINANCE("kraken:"&ARL10&"/USD", "price_history", "10d")} ,SUBSTITUTE(TRANSPOSE(SPLIT(REPT(12,1050),2)),1,"MISTAKE")) etc.
the thing is that I have about 1000 values from ARL8 reference to ARL1008 reference so it will take really long for me to write it all manually, so is there a way I can keep the rest of the function but have the ARL cell reference dynamically written while being able to specify the length of the array?
It's something I am struggling for a while now and still couldn't find a way so I really appreciate if you could explain the solution as well, and if there is more info I can give let me know, and thanks.
I tried a few things but they gave me different errors I didn't know how to solve and others just didn't work, I will just put it in case it helps
=ARRAYFORMULA(CRYPTOFINANCE("kraken:"&ARL8:ARL1008&"/USD", "price_history", "10d"))
the error it gave me is - "error Attribute price_history isn't supported in batch formulas"
try:
=BYROW(ARL8:ARL20, LAMBDA(x, CRYPTOFINANCE("kraken:"&x&"/USD", "price_history", "10d"))
update
you can generate a formula with a formula like:
={""; INDEX("=ARRAYFORMULA({SPLIT(""Exchange,Base,Quote,Time,Open,High,Low,Close,Quote Volume,Base Volume"", "","")"&
QUERY(";QUERY(TO_TEXT(CRYPTOFINANCE(""kraken:""&"&C2&
SEQUENCE(C3, 1, C4)&"&""/USD"",""price_history"",""10d"")), ""offset 1"", )",,9^9)&"})")}
demo sheet
I'm making a scheduling app, and storing all the scheduled things in firebase with arrays. When I try to schedule something with the same string value, it fails and doesn't add it to the array. I don't know if this is something in swift I can edit, or if it's a firebase setting.
If it's something in swift, here's the code updating the array:
doc.updateData([
"Instructor": FieldValue.arrayUnion(["\(scheduleinstructor)"])
])
If it's something in firebase, could someone please explain a way around this or a simple fix I overlooked?
According to the documentation on adding items to an array:
arrayUnion() adds elements to an array but only elements not already present
So the fact that the duplicate entry is not added is by design. If you want to allow that, you'll have to:
Read the document with the array from the databae.
Extract the array from the document into your application code.
Add the item to the array.
Write the entire modified array back to the database.
If I would like to match the word that I need to find it the same as <lookup> in Excel. I intend to create a form for Example. I have a file certain big data and I will create a box for fill in data that you need then Enter it show the Description of data. Now I got stuck I don't know how to write to the script I have learned in youtube but don't have a solution that nearby with my need it nearby just <Indexof> function.
var data = Activesheet.getRange(1,1,Activesheet.getLastRow()-1,1).getValues();
Logger.log(data.indexOf("TPBSA"));
data is a 2D(two dimensional) array. indexOf only works with a 1D array. flatten the array before indexOf:
const data = [["A1"],["A2"],["TPBSA"],["A4"]];
console.info(data.flat().indexOf("TPBSA"));
//or
console.info(data.findIndex(e=>e[0]==='TPBSA'))
There is an array of objects. I'm trying to removeChild an object from that array like below. removeChild works fine but the array won't refresh itself after removing uppest object. As you can see in below, i tried to trace array items out.
Firstly, array has three items, obviously the myArray.length must be 3.
After removing a child, myArray.length must be 2, but it get 3 (Wrong).
removeChild(myArray[currShape]);
trace(myArray);
Please tell me what am i missing here.
Assuming you're using ActionScript, removeChild() only serves to take objects off the stage. It doesn't take things out of an array. You have to take the object out of the array manually in another statement.
You could try something like:
removeChild(myArray.splice(currShape,1));
This removes the entry from the array and returns that entry that will be used to remove it from the stage.
Alright let me explain detailed my question
this below image is displaying my matrix where i want to copy my data
Alright now what i want to do that is as you can see 1x4 cell
i want to copy it as an array to another variable such as
input_values=ones(1,4);%init
input_values=input_matrix_training(1);
So at the above i am trying to copy the elements in that cell array which is row 1 to the input_values array. But if i do as i above i am getting this instead of the values that array contains. ty
instead of above it should be like
The other values are a cell, and are thus best referenced with {} instead of (). Also, sometimes they need to be wrapped into [], depending on the format. Plus the fact that you don't need to initialize input_values, and what you should do becomes this:
input_values=[input_matrix_training{1}];
Or you can just use cell2mat
input_values=cell2mat(input_values(1));