رفتن به مطلب

ارسال های توصیه شده

تو این تاپیک تولباکس هایی که برای متلب توی زمینه های مختلف نوشته شده رو قرار میدیم. منبع بیشتر فایل ها

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.
هستش، لینک منبعشون هم توی همون پست میاریم. الزاما همه فایل هایی اینجا قرار می گیرن، به صورت مجموعه ای از کد های مختلف نیستن، ممکنه فقط شامل یه mfile باشن. لیست کل فایل های این تاپیک رو هم با توضیح کوتاهی در این پست میارم.

بازی ها و کدهای جالب دیگه ای که با متلب نوشته شده هم در همین تاپیک گذاشته میشه. ممکنه بعضی فایل ها مشابه هم باشند، ولی خب تقریبا همه اونهایی که بیشتر استفاده رو قرار می دیم.

اگه تولباکسی هم در نظر دارین که اینجا قرار داده نشده، می تونین توی همین تاپیک مطرح کنین یا به من اطلاع بدین تا به فایل های این تاپیک اضافه بشه.

 

من چون خودم از خیلی هاشون استفاده نکردم، نمی تونم در موردشون خیلی توضیح بدم. ممنون میشم دوستانی که ازشون استفاده کردن، توضیحات خودشون رو در اختیار من قرار بدن، تا با اسم خودشون جایگزین توضیحات فعلی بشه.

 

 

لیست فایل ها (برای رفتن به پست هر فایل روی نام فایل کلیک کنین)

 

کاربردی:

Export Fig: محبوب ترین کدی هست که روی

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.
قرار داره و برای ذخیره ی محتویات پنجره ی Figure (نمودار، تصویر) به صورت عکس بکار میره. متلب دستور به نام saveas برای اینکار داره، ولی به کمک Export Fig عکس های با کیفیت بهتری می تونیم داشته باشیم.

 

Subplot :Panel متلب معین قابلیت نمایش چند نمودار یا تصویر رو در یک فرمت ماتریسی با تعداد سطر و ستون داره، که بخش زیادی از پنجره ی Figure هم توسط فضای خالی بین نمودارها اشغال میشه. به کمک این کد می تونیم حالت های بیشتری برای نمایش نمودارها در کنار هم داشته باشیم، همچنین مشکل فضای خالی بین نمودار ها هم رفع خواهد شد.

tight subplot: این فایل هم مشابه panel (فایل قبلی) برای حذف فضای خالی بین نمودارها و یا تنظیم مقدارش نوشته شده. البته panel حالت های جدیدی هم برای نمایش فراهم می کنه.

 

Tightfig: این فایل برای حذف فضای خالی پنجره Figure متلب نوشته شده. البته برای حالتی که چند تا نمودار هم داریم مثل موقعی که از suplot استفاده می کنیم، هم قابل استفاده است. توی حالت دوم عملکردی مثل دو فایل قبلی (tight subplot و Panel) داره.

 

41Complete GUI Examples: برای ساخت GUI درمتلب از دو روش میشه استفاده کرد، در روش اول از دستور guide که یه سری ابزار آماده داره استفاده میشه. روش دوم هم از طریق کدنویسی با استفاده از توابعی که برای اینکار در نظر گرفته شده. در این فایل 41 مثال فوق العاده جذاب و کاربردی از ساخت رابط کاربری گرافیکی (GUI) به روش کدنویسی قرار داده شده.

 

بازی و کد های جالب:

 

MATLABTETRIS: بازی Tetris که با متلب نوشته شده، فقط هم شامل یه mfile هست. برای این بازی چند تا کد نوشته شده، ولی این کد بیشتر از بقیه دانلود میشه.

 

Moon Lander: توی این بازی هم باید سفینه رو روی مکان مورد نظر (مربع آبی) بدون برخورد به محیط اطراف فرود بیارین. بازی هم با کلید های جهت انجام میشه.

 

Super Mario: این بازی هم همه می شناسیم، البته بازیش نیست. فقط دمویی از مرحله ی اول بازی با آهنگش هست و توی همون محیط می تونه حر کت کنه.

 

Flappy Bird: بازی Flappy Bird هست که با متلب نوشته شده. نسبت به بازی های دیگه جدید تر هست و خیلی هم طرفدار پیدا کرده.

Stellaria: این یه بازی دیگه که با متلب نوشته شده، با اینکه مال چند سال پیش هست ولی هنوز هم زیاد دانلود میشه. به ادعای برنامه نویسش بهترین بازی نوشته شده با متلب هست.

Space Invaders: این بازی هم با متلب نوشته شده، فقط شامل چند تا mfile هست. برای نوشتن بازی هم از تعریف Class در متلب استفاده کرده.

 

[h=1]تولباکس ها و مجموعه کدهای مفید برای کار با تصاویر پزشکی[/h]

لینک به دیدگاه
  • پاسخ 40
  • ایجاد شد
  • آخرین پاسخ

بهترین ارسال کنندگان این موضوع

Export Fig

pxg0xz6hdpox639s3jo.jpg

محبوب ترین کدی هست که روی

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.
قرار داره و برای ذخیره ی محتویات پنجره ی Figure (نمودار، تصویر) به صورت عکس بکار میره. متلب دستور به نام saveas برای اینکار داره، ولی به کمک Export Fig عکس های با کیفیت بهتری می تونیم داشته باشیم. از جمله اینکه Export Fig روی خطوط و فونت نوشته های نمودار اصلاحاتی برای بهتر شدن عکس خروجی انجام میده. عکس خروجی می تونه پس زمینه ی شفاف (Transparent) داشته باشه، می تونیم به کمک اون از تصویر خروجی حاشیه ی پنجره ی Figure رو حذف کنیم. تصویر خروجی می تونه در فضاهای Grayscale، RGB و CMYK ذخیره بشه. میزان فشرده سازی تصویر خروجی هم قابل تنظیم هست، حتی می تونیم به صورت بدون اتلاف هم ذخیرش کنیم، کیفیت تصویرمون تغییری نکنه. همینطور اندازه تصویرخروجی نیز به سادگی قابل تغییر هست.

یه مثال هم از استفاده از این کد:

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

سه تا عکس خروجی حاصل از این کد:

 

تصویر اول

 

bvq6ev7vqelhcrcf39db.jpg

 

 

تصویر دوم

 

uuco0z4ggd2gdh71b7f.jpg

 

تصویر سوم

 

b0662u3bp4i6fp7fdswr.jpg

این

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.
هم مثال هایی از کاربرد این فایل هست که نویسنده روی سایت شخصی خودش گذاشته.

 

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

by

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

11 Apr 2009 (Updated 08 May 2014)

Exports figures nicely to a number of vector & bitmap formats.

This file was selected as MATLAB Central

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

 

Description This function saves a figure or single axes to one or more vector and/or bitmap file formats, and/or outputs a rasterized version to the workspace, with the following properties:

- Figure/axes reproduced as it appears on screen

- Cropped borders (optional)

- Embedded fonts (pdf only)

- Improved line and grid line styles

- Anti-aliased graphics (bitmap formats)

- Render images at native resolution (optional for bitmap formats)

- Transparent background supported (pdf, eps, png)

- Semi-transparent patch objects supported (png only)

- RGB, CMYK or grayscale output (CMYK only with pdf, eps, tiff)

- Variable image compression, including lossless (pdf, eps, jpg)

- Optionally append to file (pdf, tiff)

- Vector formats: pdf, eps

- Bitmap formats: png, tiff, jpg, bmp, export to workspace

This function is especially suited to exporting figures for use in publications and presentations, because of the high quality and portability of media produced.

Note that the background color and figure dimensions are reproduced (the latter approximately, and ignoring cropping & magnification) in the output file. For transparent background (and semi-transparent patch objects), use the -transparent option, and set the axes 'Color' property to 'none' where desired. Pdf, eps and png are the only file formats to support a transparent background, whilst the png format alone supports transparency of patch objects.

 

When exporting to vector format (pdf & eps), and to bitmap using the painters renderer, this function requires that ghostscript is installed on your system. You can download this from:

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

When exporting to eps it additionally requires pdftops, from the Xpdf suite of functions. You can download this from:

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

Usage examples can be found at:

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

When reporting bugs, please use the 'Contact Author' link on my Author page, rather than pasting the error into the comments - I will respond more quickly, especially if I can email you back.

 

 

لینک منبع فایل:

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

لینک به دیدگاه

Panel

 

oen3cioslg0gqwem35u0.png

Subplot متلب معین قابلیت نمایش چند نمودار یا تصویر رو در یک فرمت ماتریسی با تعداد سطر و ستون داره، که بخش زیادی از پنجره ی Figure هم توسط فضای خالی بین نمودارها اشغال میشه. به کمک این کد می تونیم حالت های بیشتری برای نمایش نمودارها در کنار هم داشته باشیم، همچنین مشکل فضای خالی بین نمودار ها هم رفع خواهد شد. تعداد زیادی مثال هم برای استفاده از این کد توی این فایل قرار داره.

 

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

by

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

21 May 2008 (Updated 15 May 2013)

Like subplot, but easier, and WYSIWYG export to file. Also fixes dashed/dotted lines in export.

 

This file was selected as MATLAB Central

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

 

Panel is an alternative to Matlab's "subplot", providing easier control over layout (particularly, easy elimination of whitespace). It also fixes dashed/dotted lines during export to image files (both vector and bitmap formats).

If you find the layouts generated by subplot() have too much space and not enough axis, try Panel. If you find it tedious to construct subplot layouts that are more complex than a simple grid, try Panel. If you always resort to other software to prepare your final figures for publication because you can't get the appearance you want from Matlab, try Panel.

Panel was designed to produce output for print publications directly from Matlab. Layouts are, by default, in physical units (mm, by default), and exporting to a graphics file targets print columns directly. However, it performs equally well if the end goal is digital display, providing easy control over use of screen real estate.

Panel incorporates features suggested by several Matlab Central users, as well as some code - see the documentation for details.

Questions? Please see the

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.
first.

 

لینک منبع فایل:

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

لینک به دیدگاه

tight subplot

 

rsk31tt70eih01d8k5zu.png

این فایل هم مشابه panel (فایل پست قبل) برای حذف فضای خالی بین نمودارها و یا تنظیم مقدارش نوشته شده. البته panel حالت های جدیدی هم برای نمایش فراهم می کنه.

 

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

by

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

23 Jun 2010

 

Fills the figure with axes subplots with easily adjustable margins and gaps between the axes.

This file was selected as MATLAB Central

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

 

Subplot tends to leave a lot of empty space around the axes. Tight_subplot allows to adjust the spacing between the axes as well as the margins around the axes.

For example:

ha = tight_subplot(3,2,[.01 .03],[.1 .01],[.01 .01])

for ii = 1:6; axes(ha(ii)); plot(randn(10,ii)); end

set(ha(1:4),'XTickLabel',''); set(ha,'YTickLabel','')

 

 

لینک منبع فایل:

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

لینک به دیدگاه

Tightfig

 

4mx0f3z5bkzpt29sszkp.png

این فایل برای حذف فضای خالی پنجره Figure متلب نوشته شده. البته برای حالتی که چند تا نمودار هم داریم مثل موقعی که از suplot استفاده می کنیم، هم قابل استفاده است. توی حالت دوم عملکردی مثل فایل های دو پست قبل بالا (tight subplot و Panel) داره.

 

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

by

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

02 Dec 2011 (Updated 17 Dec 2012)

 

Remove excess margins from figures.

 

This file was selected as MATLAB Central

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

 

Alters a figure so that it has the minimum size necessary to

enclose all axes in the figure without excess space around them.

Works for figures containing multiple axes as subplots.

Note that tightfig will expand the figure to completely encompass all

axes if necessary.

Returns an error if the figure contains any 3D axes which have been zoomed.

 

 

لینک منبع فایل:

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

لینک به دیدگاه

41 Complete GUI Examples

 

s851vmpvq04b02eycrje.png

 

برای ساخت GUI درمتلب از دو روش میشه استفاده کرد، در روش اول از دستور guide که یه سری ابزار آماده داره استفاده میشه. روش دوم هم از طریق کدنویسی با استفاده از توابعی که برای اینکار در نظر گرفته شده. در این فایل 41 مثال فوق العاده جذاب و کاربردی از ساخت رابط کاربری گرافیکی (GUI) به روش کدنویسی قرار داده شده. توی این عکس بیشترشون رو گذاشتم. توی توضیحات انگلیسی گفته شده که از کدوم فانکشن های متلب توی هر کد استفاده شده، فایل توضیحات رو هم اینجا میذارم. اگه دنبال استفاده از فانکشن خاصی توی GUI می گردین، می تونین توی همین پیج با Ctrl+F پیدا کنین.

Contents


    [*=left]GUI_1 Explore simple string manipulation.
    [*=left]GUI_2 Explore simple string manipulation.
    [*=left]GUI_3 Explore visibility properties.
    [*=left]GUI_4 Explore simple string manipulation.
    [*=left]GUI_5 Explore simple string manipulation and user notification.
    [*=left]GUI_6 Explore selection determination.
    [*=left]GUI_7 Explore selection determination and counting.
    [*=left]GUI_8 Explore selection determination for a buttongroup.
    [*=left]GUI_9 Explore user notification.
    [*=left]GUI_10 Explore making an image visible and invisible.
    [*=left]GUI_11 Explore GUI use to stop a FOR loop.
    [*=left]GUI_12 Explore mouse pointer manipulation.
    [*=left]GUI_13 Explore slider and editbox interaction.
    [*=left]GUI_14 Explore string color control.
    [*=left]GUI_15 Explore simple string manipulation.
    [*=left]GUI_16 Explore slider and editbox interaction.
    [*=left]GUI_17 Explore clock and timer use in a GUI.
    [*=left]GUI_18 Explore the buttondownfcn for an axes.
    [*=left]GUI_19 Explore counting and argument detection.
    [*=left]GUI_20 Explore popup selection determination.
    [*=left]GUI_21 Explore popup selection determination and manipulation.
    [*=left]GUI_22 Explore popup selection determination and manipulation.
    [*=left]GUI_23 Explore multiple-figure data-passing, and the stacking order.
    [*=left]GUI_24 Explore multiple-figure data-passing.
    [*=left]GUI_25 Explore file selection/manipulation.
    [*=left]GUI_26 Explore listbox choice restriction.
    [*=left]GUI_27 Explore pointer location detection and display.
    [*=left]GUI_28 Explore contextmenues and buttondownfcn.
    [*=left]GUI_29 Explore multiple figure interaction.
    [*=left]GUI_30 Explore callback strings.
    [*=left]GUI_31 Explore multiple interactions among uicontrols.
    [*=left]GUI_32 Explore exporting data to the base workspace.
    [*=left]GUI_33 Explore exporting data to the base workspace.
    [*=left]GUI_34 Explore image capturing with a printscreen GUI.
    [*=left]GUI_35 Explore fake tabbed panels.
    [*=left]GUI_36 Explore a custom dialog box. GUI returns data to caller.
    [*=left]GUI_37 Explore string manipulation and nested functions.
    [*=left]GUI_38 Explore the user of JAVA and focussing issues.
    [*=left]GUI_39 Explore a simple drawing program and image saving.
    [*=left]GUI_40 Explore setting the background of pushbuttons to match an image.
    [*=left]GUI_41 Explore saving the state of a GUI system.

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

by

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

27 Jul 2009 (Updated 27 Jan 2010)

 

41 working GUIs to read and learn.

This file was selected as MATLAB Central

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

 

This is a collection of GUIs meant to serve either to answer specific questions about writing GUIs or as a teaching tool to aid in learning how to write MATLAB GUIs without GUIDE. Many of these are inspired directly from the newsgroup.

 

The questions/files are written in approximate order of complexity, so intermediate users may want to skip the first several files.

 

The questions answered include:

 

1.How do I manipulate the strings in a uicontrol? GUI_1, 2, 4, 5, 13, 14, 15, 20, 21, 22, 37

2.How do make a uicontrol invisible/visible? GUI_3, 35 (See also GUI_10 for images)

3.How do I make a multi-line edit box? GUI_4

4.How can I initialize an editbox so that the cursor is blinking at startup? GUI_4, 24, 37

5.How can I let the user of my GUI know his actions are futile (or producing no results)? GUI_5

6.How can I tell which uicontrol is selected e.g., radiobuttons? GUI_6, 8

7.How do I tell how many times a uicontrol has been activated? GUI_7, 19, 28, 32, 33

8.How do I tell which button in a buttongroup is selected? GUI_8

9.How do I let the user know a process is running in the background? GUI_9

10.How can I set an image visible/invisible? GUI_10

11.How can I use a GUI to exit a FOR loop? GUI_11

12.How can I control the mouse pointer with a GUI? GUI_12

13.How do I access the value (current position) of a slider? GUI_13, 16

14.How do I use different colored strings in a listbox? GUI_14

15.What is the difference between 'listboxtop' and 'value' in a listbox? GUI_14

16.How do I make text that can be copied but not changed? GUI_15

17.How can I allow the user of my GUI to set the range of a slider? GUI_16

18.How can I display a digital clock in my GUI? GUI_17

19.How can I use a timer in a GUI? GUI_17

20.How do I use the buttondownfcn on an axes object? GUI_18, 28

21.How do I make a callback talk to another callback? GUI_19

22.How can I get the string from a popup or listbox? GUI_14, 20, 21, 22, 31, 32, 33

23.How can I set the string in a popup or listbox? GUI_21, 22

24.How can I add to the string in a popup or listbox? GUI_22

25.How do I tell which figure/axes was current before my callback executed? GUI_23

26.How do I get data from another GUI? GUI_24

27.How do I make a GUI to open image files only? GUI_25

28.How can I make popup choices mutually exclusive? GUI_26

29.How can I show the current pointer location in axes coordinates? GUI_27

30.How can I use uicontextmenus? GUI_28, 33, 39

31.How do I make my GUI control an axes in another figure? GUI_29, 30

32.What are callback strings? GUI_30

33.How can I make it so that when one of the figures closes, they all close? GUI_24, 29, 30, 41

34.How do I make several uicontrols interact in a more complicated GUI? GUI_31, 32, 33, 41

35.How do I get data from a GUI to the base workspace? GUI_25, 32, 33, 36

36.How can I use a GUI to take a screenshot of my desktop? GUI_34

37.How do I make toggle buttons act like tabbed-panels? GUI_35

38.How do I make a custom dialog box which returns a string to the base workspace? GUI_36

39.How can I make a password editbox that has the ***** symbols? GUI_37

40.How can I use nested function as callbacks? GUI_11, 17, 34, 36, 37, 39, 40, 41.

41.How can I use uiwait in a GUI? GUI_11, 34, 36, 37

42.How do I use JAVA in my GUI? GUI_38

43.How do I force the figure to maintain focus between uicontrol activations? GUI_38

44.How do I save an axes as an image? GUI_39

45.How can I make a simple drawing program? GUI_39

46.How can I set a button's background to match an image? GUI_40

47.How can I save the state of a system of GUIs to use later? GUI_41

I am open to hearing any suggestion as to other questions which could be covered in the collection. Such suggestions need not be basic. Please read the pdf file prior to use. Also the contents.m file contains brief descriptions of each GUI.

Please email me if an error is found, either in the documentation or coding. Thanks.

لینک منبع فایل:

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

لینک به دیدگاه

MATLABTETRIS

 

auo4fefwtj2ups1tzy4.png

 

بازی Tetris که با متلب نوشته شده، فقط هم شامل یه mfile هست. برای این بازی چند تا کد نوشته شده، ولی این کد بیشتر از بقیه دانلود میشه. روی عدد Level کلیک کنین از مراحل بالاتر هم می تونین شروع کنین. High Score هم داخل فایل mat. ذخیره می کنه. برای بازی کردن هم از کلید های جهت صفحه کلید می تونین استفاده کنین.

اگه محیط بازی شبیه این عکس نیست، احتمالا به خاطر مشکل متلب با opengl باشه، توی خط 62 کد بازی به جای opengl از zbuffer استفاده کنین.

 

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

by

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

09 Jan 2012 (Updated 20 Jan 2012)

Another MATLAB version of the classic game, Tetris.

 

 

Pushing the following keys has the listed effect:

 

Key Effect

------------------

n.....Starts a new game in the middle of any game.

p.....Pauses/Unpauses game play.

s.....Starts the new game (alternative to pushing the start button).

Other tips:

To move the piece, use the arrow keys.

The up arrows rotates a piece clockwise, shift+up, counter clockwise.

Clicking on the preview window hides/unhides the preview (next piece).

Click on the level (1) before starting a game to choose start level. If the first level is too slow, try starting out at a higher level, up to 9. The desired starting level may also be passed in as an argument when first calling the game. For example,

matlabetetris(7)

starts the game at level 7.

Certain alterations should be easy for experienced MATLAB users, such as altering the number of lines required to advance to the next level and the acceleration rate level-to-level, as the code is well-commented. If it is desired to change these things but too difficult, feel free to contact me for assistance.

See the help in the file for more important information. If this game is found to have bugs, please contact me via email with a detailed message.

Thanks.

 

 

 

لینک منبع فایل:

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

لینک به دیدگاه

Moon Lander

 

zeg6j90kcv91n1gwdrk.png

توی این بازی هم باید سفینه رو روی مکان مورد نظر (مربع آبی) بدون برخورد به محیط اطراف فرود بیارین. بازی هم با کلید های جهت انجام میشه.

 

zirevvqskhtsfppg8q.png

 

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

by

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

06 Nov 2012 (Updated 09 Nov 2012)

 

Lunar Lander game in Matlab, fully functional, and an example of how to get keypressed in figures.

 

 

Version 0.1 (beta, so please, give feedback).

This is a game and also an example of how to read/use keypress functionality from figures.

it's a tribute to Moon Lander[1], without any lucrative pourpouse.

The game opens a figure with the spaceship that must land on the square

avoiding hitting the land.

Use the arrows to turn the spaceship and the spacebar to fire the engine.

References:

[1] Lunar Lander, Game,

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

This function was written by :

Héctor Corte

B.Sc. in physics 2010

M.Sc. in Complex physics systems 2012

NPL (National Physical Laboratory), London,United kingdom.

Email: leo_corte@YAHOO.es

 

لینک منبع فایل:

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

 

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

لینک به دیدگاه

Super Mario Bros. Demo

 

93aluswn9rfrd1y9nus2.png

این بازی هم همه می شناسیم، البته بازیش نیست. فقط دمویی از مرحله ی اول بازی با آهنگش هست و توی همون محیط می تونه حر کت کنه. دکمه های بازی هم توی توضیحات پایین آورده، A و D، برای حرکت به سمت چپ و راست، J و K هم حرکت سریع و پرش هستن.

فایل Super Mario Bros. Demo فقط شامل Matlab App هست که در ورژن های R2012b به بعد می تونه استفاه بشه، به فایل دیگه ای برای نصب نیاز نداره، بعد از نصب هم در تب Apps پنجره متلب قرار می گیره.

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

by

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

26 Mar 2013 (Updated 22 Apr 2013)

 

 

A playable demo of Super Mario Bros. World 1-1 with background music

 

 

Super Mario Bros. Demo for MATLAB

--------------------------------------

Mingjing Zhang @ Simon Fraser University

---------------------------------------

What it is

----------

This is a short demo of World 1-1 of Super Mario Bros. The demo emulates the behaviour of the original NES version as precise as my time and energy allow.

There are no enemies/coins/power-ups. The bricks are not interactive.

The flagpole and castle at the end of the stage are missing. The demo terminates when Mario moves out of the stage on the right.

There is background music which can be turned on before the game starts.

*The image you see up there is an ACTUAL screenshot of this demo.

----------

Installation

------------

Regular Version:

Put stl_mario_main.m and two .mat files under the same folder.

Run stl_mario_main.m

App Version:

Just like any other MATLAB app

------------

Control

-------

A/D - Left/Right

J - Sprint

K - Jump

-------

How to Quit

-------

1. Walk to the end of the stage, or;

2. Close the figure window

* WARNING: The window should shut down itself upon error. If it doesn't, please type 'delete(gcf)' in the command window to manually kill the figure window.

-------

Enjoy!

 

 

لینک منبع فایل:

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

لینک به دیدگاه

Flappy Bird

 

5fwaz38iu976da9c98o.png

بازی Flappy Bird هست که با متلب نوشته شده. نسبت به بازی های دیگه جدید تر هست و خیلی هم طرفدار پیدا کرده. بازی هم با جهت بالای صفحه کلید یا دکمه های Space و یا Enter انجام میشه.

 

 

 

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

by

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

08 Mar 2014 (Updated 10 Mar 2014)

 

MATLAB replica of the viral mobile game "Flappy Bird"

 

 

As one of the most popular games on app stores before being taken down, Flappy Bird does not need any further introduction. Now, it has come back alive, on MATLAB.

This implementation is intentionally made to replicate the user experience of the original game, with all physical dimensions of objects being identical. The gravity and 'jumping pulse' are also carefully adjusted so that they match the original as closely as possible.

Usage:

------

Just run flappybird.m or install the app and run it.

 

Control:

--------

Spacebar/Return/Uparrow/W/ -> Jump/Start game/Restart game;

ESC -> Quit Game.

This game app features a few technique breakthroughs that I utilize in a game for the first time. For instance, the bird sprite is represented as a SURFACE object, as opposed to an IMAGE object, so that it can easily rotate at any angle.

If you encounter any problem, or have any suggestions / feedbacks, please drop a comment down below.

Enjoy the endless flapping!

 

 

فایل Flappy Bird App فقط شامل Matlab App هست که در ورژن های R2012b به بعد می تونه استفاه بشه، به فایل دیگه ای برای نصب نیاز نداره، بعد از نصب هم در تب Apps پنجره متلب قرار می گیره.

لینک منبع فایل:

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

لینک به دیدگاه

Stellaria

 

eip40h5ha8d1z41qo8r3.png

 

این یه بازی دیگه که با متلب نوشته شده، با اینکه مال چند سال پیش هست ولی هنوز هم زیاد دانلود میشه. به ادعای برنامه نویسش بهترین بازی نوشته شده با متلب هست.

 

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

by

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

14 May 2011 (Updated 25 Sep 2012)

 

If you think you have played the best MATLAB game before. Think again after you try this one.

 

This file was selected as MATLAB Central

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

 

=============================================

Stellaria: A Figure-Based Space Shooting Game

=============================================

Stellari Studio, 2011.

Designed and Programmed by Mingjing Zhang

from

Vision and Media Lab @ Simon Fraser University

* Please note that this is a tech demo and is far from a completed game. *

* All I want to do is to demonstrate what MATLAB is capable of. *

* Stellaria features arcade-style graphics and MIDI music.*

About the Code

--------------

I wrote all code myself except for the midi synthesizer.

I apologize for the for-loop overwhelmed, global variable laden, poorly commented, ill-organized and therefore highly inefficient code.

However this is the best I can do for now.

Installation

------------

Put the folder StellariaTechDemo anywhere you like,

then Add StellariaTechDemo and all its subfolders in the search path list.

!Run stl_StellariaMain to play!

Gameplay

--------

Stellaria is just like the arcade shoot-em-up you have played before, except for the sad music.

Stellaria supports two players.

Each player has 30 lives and 3 bombs.

There are no power-ups, no boss, no score.

There is only 1 stage.

No text information will be displayed on the screen

The game can be slow when there are over 50 objects on the screen (For my i7 2.8GHz + 6 GB RAM +GTX480 computer,

this number could reach over a 100 without any significant frame dropping). Anyway, you need a better-than-average computer to play this game.

 

Control

-------

Player 1: WSAD - Movement, U - Fire, I - Bomb;

Player 2: DirKeys - Movement, Insert - Fire, Delete - Bomb;

You may skip the opening scene and credits screen by pressing 1 or 2

. They stands for 1 player and 2 players, respectively.

Graphics

 

--------

Most graphical contents used in this game are the creation of Hamukorosama.

You can find his works at this site:

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

(Japanese)

Music

-----

The background music used in this game are composed by Shi Jin (Chinese: 石进)

His Weblog:

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

(Chinese)

Toolboxes

---------

The capability of playing midi music is granted by the MIDI synthesizer written by Kenneth Adams, Jr. at GaTech

This synthesizer is available for download at

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

The synthesizer comes as a part of Stellaria. You DO NOT need to download it separately.

The synthesizer has been slightly modified by the author of this game.

Inspirations:

---------

The keyboard processing technique used in the Mario Sim v 0.1

by Ryan Kinnett

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

The double-plot star scroll technique employed by Dave's shooter game

by David Buckingham,

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

Copyright:

----------

This game is not intended for commerical purposes and is free for everyone. However, if you decide to use the code

or any graphical or audio materials in your own project, please kindly make sure the original authors (Mingjing Zhang,

Hamukorosama, Shi Jin and Kenneth Adams) are properly accredited.

Contact Info:

-------------

If you have any questions, suggestions, comments or complaints

Please do not hesitate to send me an email:

matthiaszhang@YAHOO.com

I'll write back as soon as possible.

Enjoy.

-----------------------

Update Log:

Sep 24, 2012 (V 1.3):

* An App installer is added

* Now the user can gracefully quit the game simply by closing the figure window without causing any error

 

فایل Stellaria Demo فقط شامل Matlab App هست که در ورژن های R2012b به بعد می تونه استفاه بشه، به فایل دیگه ای برای نصب نیاز نداره، بعد از نصب هم در تب Apps پنجره متلب قرار می گیره.

 

لینک منبع فایل:

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

لینک به دیدگاه

[CENTER][B][COLOR=#0000ff][FONT=courier new][SIZE=6]Space Invaders[/SIZE][/FONT][/COLOR][/B]

[IMG]http://www.noandishaan.com/upload/images/hdwesbnwovwqqee0h43.png[/IMG]
[/CENTER]

[SIZE=3]این بازی هم با متلب نوشته شده، فقط شامل چند تا mfile هست. برای نوشتن بازی هم از تعریف Class در متلب استفاده کرده.[/SIZE]

[LTR][B][URL="http://www.mathworks.com/matlabcentral/fileexchange/39277-matlab-space-invaders-videogame"][COLOR=#ff8c00][SIZE=3]Matlab Space Invaders VideoGame[/SIZE][/COLOR][/URL][/B]

by [URL="http://www.mathworks.com/matlabcentral/fileexchange/authors/161201"]Héctor Corte[/URL]
06 Dec 2012

[COLOR=#0000ff][B]A tribute to Space Invaders coded in Matlab. Just take fun and get ideas for more games.

[/B][/COLOR]
Version 0.1 (beta, so please, give feedback).
This is a game and also an example of how to read/use keypress
functionality from figures.
This is a tribute to Space invaders[1], without any lucrative pourpouse.
The game opens a figure with the spaceship that must land on the square
avoiding hitting the land.
Use the arrows to move the spaceship and the spacebar to fire laser against the enemies.
References:
[1] Space Invaders, Game,
[URL]http://en.wikipedia.org/wiki/Space_Invaders[/URL]
This function was written by :
Héctor Corte
B.Sc. in physics 2010
M.Sc. in Complex physics systems 2012
NPL (National Physical Laboratory), London,United kingdom.
Email: [URL="http://leo_corte@YAHOO.es"]leo_corte@[/URL][URL="http://www.noandishaan.com/forums/member.php?u=841"]YAHOO[/URL].es

[/LTR]

[SIZE=3][SIZE=6][COLOR=#0000FF][SIZE=3][SIZE=2][B][COLOR=#ff0000]لینک منبع فایل: [/COLOR][/B][/SIZE][/SIZE][/COLOR][/SIZE][B][FONT=courier new][URL="http://www.mathworks.com/matlabcentral/fileexchange/39277-matlab-space-invaders-videogame"][COLOR=#FF8C00]Matlab Space Invaders VideoGame [/COLOR][/URL][/FONT][/B][/SIZE]

لینک به دیدگاه
  • 1 ماه بعد...

Image Segmentation Tutorial ("BlobsDemo")





5voni7yci207fr5gjgp2.png



مثالی برای سگمنت کردن تصویر Grayscale.


برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.


by
برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

27 Aug 2009 (Updated 16 Mar 2012)

Image Processing Tutorial to demonstrate the basic concepts to beginner users.

This file was selected as MATLAB Central
برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.



Perfect for the beginner, this demo illustrates simple object detection (segmentation, feature extraction), measurement, and filtering. Requires the Image Processing Toolbox (IPT) because it demonstrates some functions supplied by that toolbox, plus it uses the "coins" demo image supplied with that toolbox. If you have the IPT (you can check by typing ver on the command line), you should be able to run this demo code simply by copying and pasting this code into a new editor window, and then clicking the green "run" triangle on the toolbar.

First finds all the objects, then filters results to pick out objects of certain sizes. The basic concepts of thresholding, labeling, and regionprops are demonstrated with a simple example.
It's a good tutorial for those users new to MATLAB's image processing capabilities to learn on, before they go on to more sophisticated algorithms.

Tested with R2008b through R2011b.




لینک منبع فایل:
برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.
برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

لینک به دیدگاه

Optical Character Recognition (OCR)

 

ozsukujfa3gltoc07ykn.jpg

 

استخراج متن یا کاراکتر از تصویر، یعنی یه تصویر مثل عکس زیر بهش میدیم، متنش رو (اعداد و حروف بزرگ انگلیسی) رو در یه فایل txt. بهمون میده:

 

 

تصویر وروری:

sqqjhbrkkzov4uwtlu6.jpg

خروجی:

 

JUDAS

PRIEST

775758

HOLA

DIEGO

12312

367945

 

 

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

by

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

31 Dec 2007 (Updated 09 Feb 2009)

 

The aim of OCR is to classify optical patterns corresponding to alphanumeric or other characters.

 

The aim of Optical Character Recognition (OCR) is to classify optical patterns (often contained in a digital image) corresponding to alphanumeric or other characters. The process of OCR involves several steps including segmentation, feature extraction, and classification. This program use Image Processing Toolbox to get it.

For more information, visit:

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.
(spanish)

or

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.
(english)

 

 

 

لینک منبع فایل:

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

لینک به دیدگاه
  • 2 هفته بعد...

سلام

ممنون از تولباکسهایی که قرار دادین

من باید با تولباکس gruph cut کار کنم بیشتر کداش با زبان سی پلاس هست توی متلب بهم خطا میده

میشه کمکم کنید؟

لینک به دیدگاه
سلام

ممنون از تولباکسهایی که قرار دادین

من باید با تولباکس gruph cut کار کنم بیشتر کداش با زبان سی پلاس هست توی متلب بهم خطا میده

میشه کمکم کنید؟

 

سلام دوست عزیز

اسم دقیق تولباکس رو می گین؟ از جایی دانلود کردین؟

لینک به دیدگاه
سلام اسمش graphcut هست. نمیدونم اینجا میتونم آپلودش کنم؟

 

سلام این لینک دانلودش

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

دوست عزیز این تولباکسی که شما استفاده می کنی، برای ++c هست. توی همون صفحه یه تولباکس برای متلب هم داره، می تونی از اون استفاده کنی:

 

 

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

 

Currently the MATLAB interface is avilable for several graph-cut based segmentation algorithms. A compiled binary version of the interface for 32-bit and 64-bit Windows can be downloaded here:

 

 

  • برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.
    (March 5th 2012)

Sources are supplied together with the main library (see above). The interface has been compiled and tested in MATLAB version 2010a.

Chan-Vese segmentation example:

 

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

Results:

cameraman.pngcameraman-seg1.pngcameraman-seg2.png

 

 

Mumford-Shah segmentation example:

 

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

 

Results:

 

fruit.pngfruit-seg.png

 

 

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

لینک به دیدگاه
  • 1 ماه بعد...

ROC curve

 

 

j8pq3uq916uwvlml1jn.png

 

g4hya5lwa7yakty6vp4l.png

 

برای محاسبه منحنی ROC استفاده میشه، تگ هایی این فایله:

 

curve, probability, receiver operating characteristics, roc, statistics

 

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

 

By

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

16 May 2008 (Updated 21 Jan 2014)

compute a ROC curve

ROC - Receiver Operating Characteristics.

The ROC graphs are a useful technique for organizing classifiers and visualizing their performance. ROC graphs are commonly used in medical decision making.

YOU CAN USE THIS FUNCTION ONLY AND ONLY IF YOU HAVE A BINARY CLASSIFICATOR.

The input is a Nx2 matrix: in the first column you will put your test values (i.e. glucose blood level); in the second column you will put only 1 or 0 (i.e. 1 if the subject is diabetic; 0 if he/she is healthy).

By itself (without arguments) roc will run a demo.

The function computes and plots the classical ROC curve and curves for Sensitivity, Specificity and Efficiency (see the screenshot).

The function will show 4 cut-off points:

1) Max sensitivity

2) Max specificity

3) Cost effective (cross point of sensitivity and specificity curves)

4) Max Efficiency

ROC requires the Curve fitting toolbox.

لینک منبع فایل:

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

برای مشاهده این محتوا لطفاً ثبت نام کنید یا وارد شوید.

لینک به دیدگاه

به گفتگو بپیوندید

هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .

مهمان
ارسال پاسخ به این موضوع ...

×   شما در حال چسباندن محتوایی با قالب بندی هستید.   حذف قالب بندی

  تنها استفاده از 75 اموجی مجاز می باشد.

×   لینک شما به صورت اتوماتیک جای گذاری شد.   نمایش به صورت لینک

×   محتوای قبلی شما بازگردانی شد.   پاک کردن محتوای ویرایشگر

×   شما مستقیما نمی توانید تصویر خود را قرار دهید. یا آن را اینجا بارگذاری کنید یا از یک URL قرار دهید.

×
×
  • اضافه کردن...