• الإعلانات

    • فيصل الحربي

      تسجيل عضوية جديدة في المنتدى   01/31/2016

      السلام عليكم ورحمة الله وبركاته  عزيزي العضو الجديد :  حاليا رسالة الإيميل لتأكيد صحة إيميلكم تذهب للبريد العشوائي ( جاري حل المشكلة )  فإذا لم تجد رسالة التحقق من إيميلكم في صندوق الوارد لديكم إتجه للبريد العشوائي ( JUNK)  وقم بتفعيل إشتراككم من هناك   

البحث في المنتدى

Showing results for tags 'Matrix calculator'.

  • البحث بالتاقات

    اكتب الكلمات المفتاحيه بينها علامه الفاصله
  • البحث بكاتب الموضوع

تم إيجاد 5 نتيجة

  1. هذه آلة حاسبة علمية كنت قد كتبتها أثناء فترة دراستي (بواسطة Visual C# Express 2005) وقد تعبت كثيراً بصناعتها وقتها     أضعها هنا لعل أحداً يستفيد منها أو من الأفكار التي استخدمتها فيها   مرفق البرنامج مع الرماز المصدري مع شرح بسيط للأفكار: Scientific Calculator.rar Calculator.doc
  2. بسم الله الرحمن الرحيم السلام عليكم ورحمة الله وبركاتة اخوتي في المنتدى اريد السؤال عن covariance matrix . ما هي ؟ وما اهميتها؟ وجزاكم الله خيرا
  3. السلام عليكم ورحمة الله تعالى وبركاته  أنا أحاول كتابة برنامج لحساب ضرب  مصفوفتين  n*n مصفوفات C = A * B اقوم بالحساب بواسطة Threads  ثلاثة ، وأنا استخدم two class ولكن هناك خطأ في نتيجة (غير صحيحة) هذا هو  شفرة المصدر.:  import java.util.Scanner;import java.util.concurrent.Semaphore;public class Matrice{private static int size,i,j,k;private    static int matrice1[][]; // Premiere matriceprivate   static int matrice2[][];// Deuxieme matriceprivate   static int resultat[][];// Matrice resultatprivate   static int vecteur[]; /* vecteur pour Numérotation des lignes et voir la ligne que cela fonctionne et que cela n'a pas fonctionné après*/         public static void main(String[] args) throws InterruptedException    {    Semaphore semaphore = new Semaphore(1);//sémaphore pour controler l'acces au vecteur         java.util.Random r=new java.util.Random( ) ; //int t1=(Integer.toString(r.nextInt(25))); nbr aleatoire de 1 a 25                Scanner read =new Scanner(System.in);System.out.print("Enter the size of the matrice : ");              size =read.nextInt();         // Generation des matrices        matrice1 = new int;        matrice2 = new int;        resultat = new int;        vecteur = new int;                 System.out.print("enter the elements of the first matrix: ");        System.out.print("\n");        for(i=0;i<size;i++) {        for(j=0;j<size;j++) {                                k=r.nextInt(25)+1;         matrice1[j]=k;                      System.out.print(" "+matrice1[j]);            if(j==size-1) System.out.print("\n");            }        }               for(i=0;i<size;i++){ //intialiser tous le matrice de resultat avec zéro         for(j=0;j<size;j++){               resultat[j]=0;}}               System.out.print("enter the elements of the second matrix: ");        System.out.print("\n");        for(i=0;i<size;i++) {        for(j=0;j<size;j++) {              // k=read.nextInt();                    k=r.nextInt(25)+1;        matrice2[j]=k;                        System.out.print(" "+matrice2[j]);            if(j==size-1) System.out.print("\n");          }        }        for(j=0;j<size;j++){ vecteur[j]=0;}                     // Creation du groupe de thread              ThreadGroup threads_Group = new ThreadGroup("Multi_threads");                        // Un thread pour chaque ligne                      new Thread(threads_Group, new Threads("thread1",matrice1, matrice2, vecteur,resultat,size,semaphore)).start();        new Thread(threads_Group, new Threads("thread2",matrice1, matrice2, vecteur,resultat,size,semaphore)).start();        new Thread(threads_Group, new Threads("thread3",matrice1, matrice2, vecteur,resultat,size,semaphore)).start();                                       /************************/                        Thread.sleep(2000);       System.out.print("\n");        for ( int i = 0;i < size; i++)        {                       for (int j = 0; j < size; j++)            {                        System.out.print(" "+resultat[j]);            if(j==size-1) System.out.print("\n");                       }        }      }    }the second class import java.util.concurrent.Semaphore;public class Threads implements Runnable{ private int tmp[][] ;// Matrice resultat private int m1[][] ; private int m2[][]; private int m3[]; //vecteur private int k=0,r;// Numero de la ligne de m1 a multiplier avec les colonnes de m2 int p=0; private Semaphore first; private String str; Threads(String str,int m1[][], int m2[][], int m3[], int tmp[][],int r,Semaphore s1) { this.m1 = m1; this.m2 = m2; this.m3 = m3; this.tmp = tmp; this.r = r; first = s1; this.str = str; } public void run() { try { while(m3[r-1]==0){ first.acquire(); while(m3[p]==1){ p++; } if(m3[p]==0){ k=p; m3[p]=1; // bool=0; System.out.println(p+" "+str ); } first.release(); Thread.sleep(30); for ( int i = 0;i < r; i++) { // Somme des produits, nous donne *un* element de tmp for (int j = 0; j < r; j++) { tmp[k][i] += m1[k][j] * m2[j][i]; System.out.print(" "+tmp[k][i]); } } } System.out.print("***************************"); } catch (InterruptedException e) { Thread.currentThread().interrupt(); e.printStackTrace();} }}الرجاء المساعدة وشكرا لكم جميعـــــــا   Matrice.java Threads.java
  4. بدأت بالعمل على برنامج لعله يفيد أحداً البرنامج لم يكتمل بعد وسأستمر بتطويره, وهو عبارة عن برنامج يقوم بعمليات حسابية كثيرة مثل الآلة الحاسبة وآلة حاسبة للمصفوفات ومحول أنظمة العد ...   لقد استخدمت مكتبة  Modern UI for WPF من أجل شكل الواجهة ومكتبة  Math.NET  من أجل عمليات المصفوفات   وهذا هو البرنامج مع الرماز المصدري PrinceMaths.rar
  5. بسم الله الرحمن الرحيم Introduction What is an Auto-Loan ? - Buying cars, new houses, having a pool or even a graden is every man's dream, unless you were born so rich to afford this, or you can go and get yourself a loan, this is simply what loan is. It's an amount of money that you get from a bank in order to be able to buy yourself a life (hahahaha) if you don't have one, but the catch is that you will have to pay later and you also need to be financially secured, so the bank could trust to give you such loan, anyway this is not our point. - The bank where you will get your loan from is going to calculate some payback amounts called (monthly payment) which are the interest of the loan you have just ordered, these monthly payments is our target. - In order to calculate the monthy payment of a loan you need to know 3 elements related to this loan : 1) How much is the loan amount ? Is how much the bank will give to you as a loan. 2) The Interest Rate. On what basis these monthly payments are going to be calculated, or it's some percentages % to determine the monthly payments per month 3) The period of the loan Is how long untill the loan is to be repaid to the bank, or it is the number of months that you will pay your monthly payments (all the monthly payments) - The Interest Rate is given by the bank, each loan system has its own Interest Rate. Interest Rates vary from bank to another and from loaner company to another, it depends on the company's or bank's willing to keep the money in your hands before they collect it + Interest . Calculations How to calculate the monthly payments of a loan? There are several ways to calculate the monthly payments, the accountant of the bank has its own way, so as the loaner comapny's accountant, so as the Excel user and the programmers of course have their own way. It is a calculator, but not just any calculator, it will be made to do certain calculations resricted to certain rules, these rules are the (3 elements) we talked about above. You will need to get the Monthly Payments as an output and you will have (Loan's amount - Interest Rate - Loan's period in years or months) as inputs . Math (Manually) calculations Monthly payments of a $12,000 for 1 year by Interest Rate of 10% is calculated like this : P = (Pv*R) / [1 - (1 + R)^(-n)] where Pv = Present Value (beginning value or amount of loan) *APR = Annual Percentage Rate (one year time period) R = Periodic Interest Rate = APR/ # of interest periods per year P = Monthly Payment n = # of interest periods for overall time period (i.e., interest periods per year * number of years) Using Microsoft Excel built-In function Even simple : Using Microsoft Excel built-In function [PMT], Syntax : = pmt(10%/12 , 12, 12000) =1054.99$ Where 10% / 12 is the interest calculations 12 is the period (how many times we will pay the bank each year) for one year 12000 the loan'a amount - We will use the manual calculations, because Microsoft Excel built-In function uses the same manual calculations implicitly to create such handy formula for its users. As a programmer you need to analyze yourself and come up with your own formulas. Here is what I come up with. Code The code below. - Source code of the loan's monthly payments calculator. Option Explicit'API to move windowless formPrivate Const HTCAPTION As Long = 2Private Const WM_NCLBUTTONDOWN As Long = &HA1Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, _ByVal wMsg As Long, _ByVal wParam As Long, _lParam As Any) As LongPrivate Declare Function ReleaseCapture Lib "user32" () As LongDim P, PV, ARP, ARP1, R, N As DoublePrivate Sub Command1_Click()'P=(Pv*R) / [1 - (1 + R)^(-n)]PV = Val(TxtLoan.Text)N = Val(Txtmonths.Text)R = Val(TxtInterest / 100) * (1 / 12)ARP = Val(1 + R) ^ NARP1 = Val® / (ARP - 1)P = Val(R + ARP1) * PVTxtMp.Text = Format(P, "#.00")End SubPrivate Sub Command1_KeyPress(KeyAscii As Integer)If KeyAscii = vbKeyEscape Then EndEnd SubPrivate Sub Form_KeyPress(KeyAscii As Integer)If KeyAscii = vbKeyEscape Then EndEnd SubPrivate Sub Form_Load()DTC.Value = NowEnd SubPrivate Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)'Moving the form using mouse button from any location on the form held with mouseIf Button = 1 ThenReleaseCaptureSendMessage Me.hwnd, WM_NCLBUTTONDOWN, HTCAPTION, ByVal 0&End IfEnd SubPrivate Sub Image1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)If Button = 1 ThenReleaseCaptureSendMessage Me.hwnd, WM_NCLBUTTONDOWN, HTCAPTION, ByVal 0&End IfEnd SubPrivate Sub Label10_Click()Set MainFrm = NothingEndEnd SubPrivate Sub Label12_Click()Me.WindowState = vbMinimizedEnd SubPrivate Sub Timer1_Timer()Label1.Caption = Format(Now, "DDDD, D/MMMM/YYYY")Label2.Caption = Format(Now, "HH:MM:SS")End SubPrivate Sub TxtLoan_KeyPress(KeyAscii As Integer)If KeyAscii = vbKeyEscape Then EndEnd SubPrivate Sub Txtyears_Change()Txtmonths.Text = Val(Txtyears.Text) * 12End SubPrivate Sub Txtyears_KeyPress(KeyAscii As Integer)If KeyAscii = vbKeyEscape Then EndEnd Subلتحميل السورس كود