Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6636925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:14:53+00:00 2026-05-25T23:14:53+00:00

I am using Advanced Matrix Library in C#. NET@ http://www.codeproject.com/KB/recipes/AdvancedMatrixLibrary.aspx?msg=4042613#xx4042613xx. library css file is

  • 0

I am using Advanced Matrix Library in C#. NET@
http://www.codeproject.com/KB/recipes/AdvancedMatrixLibrary.aspx?msg=4042613#xx4042613xx.

library css file is like

using System;

namespace MatrixLibrary
{
public class Matrix
    {
      private double[,] in_Mat;
            public Matrix(int noRows, int noCols)
    {
        this.in_Mat = new double[noRows, noCols];
    }
            public Matrix(double [,] Mat)
    {
        this.in_Mat = (double[,])Mat.Clone();
    }

        public static double[,] Identity(int n)
        {
            double[,] temp = new double[n,n];
            for (int i=0; i<n;i++) temp[i,i] = 1;
            return temp;
        }

public static double[,] ScalarDivide(double Value, double[,] Mat)
    {
        int i, j, Rows, Cols;
        double[,] sol;

        try  {Find_R_C(Mat, out Rows, out Cols);}
        catch{throw new MatrixNullException();}

        sol = new double[Rows+1, Cols+1];

        for (i = 0; i<=Rows;i++)
            for (j = 0; j<=Cols;j++)
                sol[i, j] = Mat[i, j] / Value;

        return sol;
    }


}}

I am trying to get identity matrix and getting error of type conversion. Could some one please guide me.

Matrix id_mat = MatrixLibrary.Matrix.Identity(6);

Can’t implicity convert typedouble[,] to Matrix.

But

Matrix B = new Matrix(4, 4);
 Random rnd = new Random();
            for (int i = 0; i < B.NoRows; i++)
                for (int j = 0; j < B.NoCols; j++)
                    B[i, j] = 2 * rnd.NextDouble();

Matrix E = Matrix.ScalarDivide(2, B);

It works and I can Have a matrix. Please guide me?

regards,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T23:14:53+00:00Added an answer on May 25, 2026 at 11:14 pm

    Read the error message.

    You have a method that returns double[,] and you are trying to store the reference in a variable for Matrix. There is no implicit conversion from a multidimensional array of doubles to a Matrix.

    To use that method, you would write

    double[,] id_max = MatrixLibrary.Maxtrix.Identify(6);
    

    If you actually need to store it as a Matrix, you need to define the appropriate conversion to do so.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok guys, I am using the following library: http://www.codeproject.com/KB/recipes/AdvancedMatrixLibrary.aspx And I wish to calculate
Qt library includes advanced meta-programming capabilities using they own preprocessing moc compiler. Does anyone
I am using Advanced DataGrid of Flex 3 with hierarchical data. The itemRenderer is
I am using Advanced.LuceneQuery e.g. RavenQueryStatistics stats = null; vm.Products = DocumentSession.Advanced.LuceneQuery<Product>(Products/Index) .Statistics(out stats)
Is it possible to initialise an array in Java using the 'advanced' for loop?
I have a view I'm using as an Advanced Search tool - it simply
I'm using SQL Server 2008 with Advanced Services on my Vista Home Premium. I'd
I'm using the following form as part of an Advanced Search page on my
This is my first time building an iOS project using any kind of advanced
I am using c# .net. Thanks in advance for any help. I have searched

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.