Click here to Skip to main content
15,902,635 members
Home / Discussions / C#
   

C#

 
QuestionCreate Chart in Excel with C# Pin
Member 836750218-Apr-15 2:17
Member 836750218-Apr-15 2:17 
AnswerRe: Create Chart in Excel with C# Pin
Brisingr Aerowing18-Apr-15 12:24
professionalBrisingr Aerowing18-Apr-15 12:24 
Questionfloat to and from frequency Pin
DaveyM6917-Apr-15 10:06
professionalDaveyM6917-Apr-15 10:06 
AnswerRe: float to and from frequency Pin
Sascha Lefèvre17-Apr-15 11:02
professionalSascha Lefèvre17-Apr-15 11:02 
GeneralRe: float to and from frequency Pin
DaveyM6917-Apr-15 13:16
professionalDaveyM6917-Apr-15 13:16 
GeneralRe: float to and from frequency Pin
Sascha Lefèvre17-Apr-15 13:48
professionalSascha Lefèvre17-Apr-15 13:48 
GeneralRe: float to and from frequency Pin
DaveyM6917-Apr-15 14:15
professionalDaveyM6917-Apr-15 14:15 
GeneralRe: float to and from frequency Pin
Sascha Lefèvre17-Apr-15 14:29
professionalSascha Lefèvre17-Apr-15 14:29 
GeneralRe: float to and from frequency Pin
DaveyM6918-Apr-15 0:01
professionalDaveyM6918-Apr-15 0:01 
GeneralRe: float to and from frequency Pin
Sascha Lefèvre18-Apr-15 3:53
professionalSascha Lefèvre18-Apr-15 3:53 
AnswerRe: float to and from frequency Pin
Mycroft Holmes17-Apr-15 22:51
professionalMycroft Holmes17-Apr-15 22:51 
GeneralRe: float to and from frequency Pin
DaveyM6918-Apr-15 0:03
professionalDaveyM6918-Apr-15 0:03 
QuestionRe: float to and from frequency Pin
Kenneth Haugland17-Apr-15 23:23
mvaKenneth Haugland17-Apr-15 23:23 
AnswerRe: float to and from frequency Pin
DaveyM6918-Apr-15 0:00
professionalDaveyM6918-Apr-15 0:00 
Brilliant find Kenneth!

I have tweaked the C# method on that page to:
C#
float[] logValues = CreateLogValues(20, 400, 101);

public static float[] CreateLogValues(float minimum, float maximum, int valuesCount)
{
    double logarithmicBase = Math.E;
    double logMinimum = Math.Log(minimum);
    double logMaximum = Math.Log(maximum);
    double delta = (logMaximum - logMinimum) / (valuesCount - 1);
    double accumulatedDelta = 0;
    float[] values = new float[valuesCount];
    for (int i = 0; i < valuesCount; ++i)
    {
        values[i] = (float)Math.Pow(logarithmicBase, logMinimum + accumulatedDelta);
        accumulatedDelta += delta;
    }
    return values;
}
which is a good start. I should be able to sort the rest from here Smile | :)

Thanks Thumbs Up | :thumbsup:
Dave

Binging is like googling, it just feels dirtier.
Please take your VB.NET out of our nice case sensitive forum.
Astonish us. Be exceptional. (Pete O'Hanlon)

BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)



GeneralRe: float to and from frequency Pin
Kenneth Haugland18-Apr-15 0:40
mvaKenneth Haugland18-Apr-15 0:40 
GeneralRe: float to and from frequency Pin
Kenneth Haugland18-Apr-15 0:43
mvaKenneth Haugland18-Apr-15 0:43 
GeneralRe: float to and from frequency Pin
DaveyM6918-Apr-15 3:02
professionalDaveyM6918-Apr-15 3:02 
QuestionDataTable output to string with filter Pin
Blubbo17-Apr-15 8:58
Blubbo17-Apr-15 8:58 
GeneralRe: DataTable output to string with filter Pin
PIEBALDconsult17-Apr-15 9:06
mvePIEBALDconsult17-Apr-15 9:06 
GeneralRe: DataTable output to string with filter Pin
Blubbo17-Apr-15 9:35
Blubbo17-Apr-15 9:35 
GeneralRe: DataTable output to string with filter Pin
Blubbo17-Apr-15 9:49
Blubbo17-Apr-15 9:49 
GeneralRe: DataTable output to string with filter Pin
Sascha Lefèvre17-Apr-15 9:53
professionalSascha Lefèvre17-Apr-15 9:53 
GeneralRe: DataTable output to string with filter Pin
Blubbo17-Apr-15 9:56
Blubbo17-Apr-15 9:56 
GeneralRe: DataTable output to string with filter Pin
Sascha Lefèvre17-Apr-15 11:52
professionalSascha Lefèvre17-Apr-15 11:52 
AnswerRe: DataTable output to string with filter Pin
Sascha Lefèvre17-Apr-15 10:26
professionalSascha Lefèvre17-Apr-15 10:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.