Interpolate strings from an x y interval to a corresponding x y interval.
Mostra commenti meno recenti
I am restructuring a database and I have two tables in different formats but with the same information. Table One is a combination of values and strings where the from-to data are in custom intervals rounded to the nearest '0.25' as follows:
.Table two is the same range of values and contains all the same integers but is formatted as fixed incremental 'blocks' instead of custom intervals.

I want to take the strings from table 1 and interp them onto table 2 so that if the 'from-to' values of table 2 falls within the range of an interval in table 1 it will have the corresponding strings as imagined below.

I can not seem to find a function that will allow me to perform this task with strings.
Any help would would be very much appreciated, thanks!
4 Commenti
Jan
il 6 Mar 2022
It would be much easier to suggest a solution, if you post some code to produce the inputs. Currently trying to create some code requires to invent some code for the inputs also, what is a waste of time, because you do have the data already. Please share them with us.
Peter Wray
il 6 Mar 2022
Jay
il 15 Mar 2023
Can you share the code of the solution because I have the same question and not able to find answers anywhere else on this topic ?
Risposta accettata
Più risposte (1)
Peter Perkins
il 7 Mar 2022
1 voto
If you had timetables, ths would be a one-liner using synchronize. from and blocksFrom look suspiciously like time vectors. Timetables might make your life easier, but hard to tell.
Categorie
Scopri di più su String in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!