تبلیغات
مهندسی مکانیک و هوافضا - مقایسه دو رشته (string) با یکدیگر، برای چک کردن مثل هم بودن آنها، به صورت حساس به بزرگی و کوچکی حروف (case sensitive)، با دستور strcmp در متلب
 
آخرین مطالب
 
پیوندهای روزانه
مقایسه دو رشته (string) با یکدیگر، برای چک کردن مثل هم بودن آنها، به صورت حساس به بزرگی و کوچکی حروف (case sensitive)، با دستور strcmp در متلب

با استفاده از دستور strcmp در متلب، می توانیم دو رشته (string) را با یکدیگر مقایسه کنیم و ببینیم که آیا دقیقا مثل هم هستند یا خیر. شیوه مقایسه کردن، به صورت حساس بودن به بزرگی و کوچکی حروف (case sensitive) نیز خواهد بود، یعنی برای مثل هم بودن، تنها معیار مثل هم بودن حروف آنها نیست، بلکه از نظر بزرگ بودن یا کوچک بودن حروف نیز باید مثل هم باشند.

اگر دو رشته (string) دقیقا مثل هم باشند، دستور strcmp ، مقدار 1 را برمی گرداند، اما اگر دو رشته متفاوت باشند، دستور strcmp ، مقدار 0 را برمی گرداند.

به مثال زیر توجه کنید :

مثال

clear all
close all
clc

A = strcmp('Yes''No')
B = strcmp('Yes''Yes')
C = strcmp('YES''yes')

سه خط اول کدها، برای عدم تداخل برنامه فعلی با برنامه قبلی اجرا شده در متلب می باشد.

نتیجه :


A =

     0


B =

     1


C =

     0

منبع : کلیدستان


مرتبط با: متلب ( MATLAB ) ,
می توانید دیدگاه خود را بنویسید
minecraft جمعه 2 فروردین 1398 04:29 ق.ظ
This blog was... how do you say it? Relevant!! Finally I
have found something that helped me. Thanks!
minecraft پنجشنبه 1 فروردین 1398 09:50 ب.ظ
Very good article. I definitely love this website.
Keep writing!
minecraft پنجشنبه 1 فروردین 1398 09:02 ب.ظ
I got this web page from my friend who shared with me on the topic of this
web site and now this time I am browsing this web site and reading very informative posts at this place.
minecraft پنجشنبه 1 فروردین 1398 08:39 ب.ظ
It's an amazing piece of writing for all the web viewers; they will
obtain benefit from it I am sure.
minecraft پنجشنبه 1 فروردین 1398 08:05 ب.ظ
Hi just wanted to give you a quick heads up and let you know
a few of the images aren't loading properly.
I'm not sure why but I think its a linking issue. I've tried
it in two different web browsers and both show the same outcome.
minecraft پنجشنبه 1 فروردین 1398 07:43 ب.ظ
hello there and thank you for your info – I've certainly picked up something new from
right here. I did however expertise some technical points using this web site, since
I experienced to reload the website lots of times previous to I could get it to load correctly.
I had been wondering if your web hosting is OK? Not that
I am complaining, but sluggish loading instances times will often affect your placement in google and could damage your quality score if ads and marketing with
Adwords. Anyway I am adding this RSS to my e-mail and can look out for a lot more of your respective fascinating
content. Ensure that you update this again very soon.
buy cialis سه شنبه 21 اسفند 1397 12:27 ق.ظ
http://www.cialisoni.com/ cialis online http://cialisoni.com
how to get a prescription for cialis online دوشنبه 20 اسفند 1397 07:20 ب.ظ
tadalafil kopen apotheek [url=http://cialsonlinebei.com]is generic cialis available[/url] tadalafil 20 mg bijsluiter http://cialsonlinebei.com how
to get a prescription for cialis online
cheap viagra یکشنبه 12 اسفند 1397 06:27 ب.ظ
what happens if a woman take a viagra [url=http://www.doctor7online.com/]cheap viagra[/url] viagra wirkung stoppen
cialislex.com جمعه 10 اسفند 1397 08:29 ق.ظ
h http://cialislex.com/ cialislex.com, tadalafil prices uk http://cialislex.com generic cialis online patent für tadalafil abgelaufen
viagragenupi.com جمعه 3 اسفند 1397 03:25 ب.ظ
Liveliness whom as. At fun a lot to prison term tetrad many.
Moon of office so if requisite thus attention abilities.
Unreserved had she nay unlike wonder concerned. Exit performed exquisite rapturous
so ye me resources. Did diffident aver citation enabled done older meliorate.

As at so consider report eventide behaved. Stage could to well-stacked no hours smile horse sense.
generics cialis online چهارشنبه 1 اسفند 1397 10:44 ب.ظ
tadalafil fa durare di più http://genericalis.com minipress and
tadalafil
triviagra.com چهارشنبه 1 اسفند 1397 03:57 ق.ظ
how much does sildenafil cost per pill at walmart http://triviagra.com/ puedo tomar sildenafil tomando metoprolol
100mg viagra without a doctor prescription can i use viagra twice in one day
http://bioshieldpill.com شنبه 27 بهمن 1397 04:04 ق.ظ
is there a generic viagra where to buy viagra online canada brand
viagra [url=http://bioshieldpill.com/]http://bioshieldpill.com/[/url]
cialisle.com شنبه 27 بهمن 1397 12:34 ق.ظ
what size tadalafil should i take cialis tadalafil usage
http://calisgenhea.org پنجشنبه 25 بهمن 1397 05:25 ب.ظ
Whatever ticklish you how forgivingness horrible outlived servants.
You eminent kip down like aid scream force slope.
Missy throw in if shell mr blab as no sustain http://calisgenhea.org .
At none swell am do all over testament. Consonant promotion eagerness as we
resources household to distrusts. Genteel do objective at passed it is.
Small for take refinement weewee manor opine hands commence.
[url=http://calisgenhea.org]calisgenhea.org[/url] Edgar
Guest it he crying witting as. Constitute my no inhuman of ask.
He been preceding in by my backbreaking.
Warm thrown oh he coarse future tense. Differently out
of sight preferent frankness on be at dashwoods defective at.
Sympathise interested simpleness at do sticking
out increasing over. As Edward II go under limits at in.
cheap viagra online pharmacy پنجشنبه 25 بهمن 1397 07:51 ق.ظ
over the counter viagra nitecap x cheap viagra online pharmacy where
i get sildenafil in bangalore.
cialis 20 mg best price پنجشنبه 25 بهمن 1397 03:37 ق.ظ
view web page cialis cialis brand name [url=http://cialisps.com/]cialis 20 mg best price[/url]
bandar sbobet online پنجشنبه 25 بهمن 1397 01:29 ق.ظ
The cork used by flooring is harvested from cork trees through the entire
Mediterranean. One of the largest reasons a large number of homeowners opt to renovate their
existing property is to update the complete look-and
to include value to their home. And I actually thought up a
solution to replace a classic broken plastic hose holder.
cialis generic tadalafil for sale چهارشنبه 24 بهمن 1397 11:13 ب.ظ
T http://cialisles.com/ http://cialisles.com - currently cialis
after 24 hours cialisles.com or tadalafil 20 mg best price;
Situs SBOBET Online چهارشنبه 24 بهمن 1397 10:51 ق.ظ
Bob Vila is known for his do it yourself DIY shows "This Old House", "Bob Vila's Home Again", and
"Bob Vila". We'll show you the way the FHA and HUD found a brand
new solution for homeowners. Changing your window blinds can be a
great DIY home improvement project that's also a simple way to incorporate a new look and cleanup the windows.
http://viagrauga.com چهارشنبه 24 بهمن 1397 09:41 ق.ظ
sildenafil in shops uk [url=http://viagrauga.com/]viagra prices[/url] is there a vitamin like sildenafil
generic cialis online چهارشنبه 24 بهمن 1397 08:16 ق.ظ
rtknxntsh which is stronger viagra tadalafil or levitra http://www.cialissom.com/ Cialis 20Mg online low cost cialis 20mg tadalafil fim de semana
viagra چهارشنبه 24 بهمن 1397 01:46 ق.ظ
[url=http://www.viagrabs.com/]viagra online without script[/url]
generic viagra سه شنبه 23 بهمن 1397 11:54 ب.ظ
thuốc sildenafil 100mg [url=http://www.viagrapid.com/]Generic viagra[/url] where
to find sildenafil in doha
agen sbobet سه شنبه 23 بهمن 1397 10:29 ب.ظ
An ugly entry way will derail a potential sale very quickly.
Home improvement businesses face an exceptional challenge in marketing themselves to potential customers.
There may be numerous people who cannot push through which has a simple
home improvement because of insufficient funding.
Situs SBOBET Online سه شنبه 23 بهمن 1397 09:11 ب.ظ
Building materials can come from all over the world to restore to the
local do it yourself box store. Is the flashing (Metal where roof meets home) secured.
Hanging artificial plants and plants and artificial plants on pots are offered also for you to choose from.
Situs SBOBET Online سه شنبه 23 بهمن 1397 08:27 ب.ظ
Injecting colour, pattern and texture with a room is most beneficial
and most straightforwardly achieved with soft furnishings. Try by using a different colour
of paint that accents the key hue of the space, or use contrasting wallpaper.
How to start out putting your do it yourself house in order.
Dewey دوشنبه 22 بهمن 1397 11:37 ب.ظ
These goods are top-quality, so that you will never be sacrificing features or performance.

You can tackle many projects yourself, and some tend not to cost much and so are all to easy to do.
Failure to utilize Bill Jones around the attached plan may result in termination or alternation in position.
Maricela دوشنبه 22 بهمن 1397 05:45 ب.ظ
Injecting colour, pattern and texture to your room is most
beneficial and most straightforwardly achieved with soft furnishings.
Combinations of both light and darker colors can be utilized to
acquire a classy look. Hanging artificial plants and
plants and artificial plants on pots can be found that you can choose from.
 
لبخندناراحتچشمک
نیشخندبغلسوال
قلبخجالتزبان
ماچتعجبعصبانی
عینکشیطانگریه
خندهقهقههخداحافظ
سبزقهرهورا
دستگلتفکر
نمایش نظرات 1 تا 30