#Functions in Matlab
Explore tagged Tumblr posts
Text
This morning I misread the theorem on the board and thought it said subset instead of subspace, which was rather troubling since we used convexity in the argument. Naturally, I ask what guarantees convexity and the professor pointed out subspace so cool. Great.
But he also said "where did you pick that up? Off the street?"
Because yeah, you can use a convex set instead of subspace. But it was such an unexpected question, phrased in such an unexpected way.
#the theorem is the metric based on the min distance between a point and a closed subspace#i do remember proving the closed convex set version once on a hw assignment (differential topology class) and it was a nightmare#seven stories#functional#DEs was also confusing and all over the place today#we were doing some matlab stuff but mostly listend/watched him? but most of us had our laptops out#which was great for me cause i was running a python script all day so I was able to fix a mistake on the input txt file during class#and start the script again#i also just like. did the entire cosing problem from the hw during class. it took like 5 min
4 notes
·
View notes
Text
i inherited the mansplaining instinct from my dad, and every time i go home and he's blathering about taxes to my mum it's like seeing myself through a fun house mirror
8 notes
·
View notes
Text
learning python rn and nothing boosts your confidence like finding the bug while the person teaching you is coding live
#also just. actually learning coding in general#bc like. for all of my comp sci osmosis I really never learned coding basics#took a matlab course once where I had to create functions with loops#and then never used matlab beyond translating pseudocode from textbook problems for numerical analysis hw#similar story for using R#my coding knowledge is passably being able to Google how to do basic things in various semi coding languages as needed#but bc it’s so spotty it’s like. evil rn#do I know about Turing machines and unsolvable halting problems????? yeah#do I cobble together the most atrocious and dangerous misuses of the one or two commands I know#to do a thing easily done by a basic function????#also yes#I need to like. learn what the things do on a fundamental level so I am not misusing them in evil ways basically#456 words
3 notes
·
View notes
Text
If you can't derive your eigenvector, store bought is fine.
theyre selling WHAT on ebay now
2K notes
·
View notes
Text
hm
#i speak#in general im not a fan of llms but i will say. they are useful for coding#everyone in my lab uses exclusively matlab and i use exclusively python#so instead of having to figure out my own code for interfacing with a function generator#i was able to just plug it in to this conversion site and give it a once over to see if it makes sense#probably saved me 4 hours of work
1 note
·
View note
Text
streets saying running wild might be an eng song ?
#idk how i feel about that TTTtTt#also im back to caring about charts which just feels horrible cause ofc jin is hl and we’re never gonna stream hl……………………..#maybe ill just delete the twt app from my phone#but i need to see content for his promo but also going iver there feels like a hellhole…………………………………………………………..#need to reset my brain but ik i won’t function normally until december man………………sab chutiya hain sale kutte ………………… matlab us walo ko#hua kya hai?#bc ek top pey has and dusre ko tum log entry bhi nahi doge ??????? dhongi sale……… aur m countdown key baad to kuch bacha hi nahi hai harne#ke liya#theek hai#ek do saal and ill stop caring okokokokkkkkkkkkkkkkk#gonna look at beautiful gifs of sj to calm down now :’))))((((#m
1 note
·
View note
Text
i genuinely hate matlab with such a passion
#this is a matlab hate blog#i refuse to leave until i get this stupid fucking function working#which would literally take two seconds in LITERALLY any other language#but no#matlab has to be a pain in the ass as always#god i can never rest
0 notes
Text
0 notes
Text
I did a bit of de novo genome assembly way, way back in the day which I have never been able to use professionally because my PI refused to spend $2000 more on getting new read depth. He had ordered the reads before actually learning anything about the pipeline and only about half of the libraries he had ordered were usable in any given pipeline, see. (Some had been for older assembly methods and others had been for newer ones, basically.)
Rather than find the money to fucking get me the reads to do it right, he heard about an open source project called RACA that was some dude's dissertation arguing that you COULD use some of the worthless libraries to fill in the gaps of the assembly and get a functional genome out of it. I spent two years trying to move massive quantities of data through that fuckhead's pipeline on the campus supercomputer to get the assembled genome out, and then I got to the end and found there was no output as fastq files or ant other format recognizable to me.
(Give me a break, I was 23 and had also been frantically learning acoustic analysis, basic electrical engineering, and technical equipment maintenance in the two years since I had started learning to code. Plus I was figuring out what I wanted my dissertation to be. I'd never grappled with anything more complicated than our home-written library of matlab acoustic analysis before, and it simply hadn't occurred to me that anyone would publish a non-functional pipeline to achieve a goal quickly anyone verifying that anyone else had done anything yet.)
Anyway, eventually he collaborated with someone else who ponied up $2000 and a postdoc to get new reads. My name was not on the paper, so that's two years of my life developing a particular and fairly unique skill set that I will almost certainly never use.
In retrospect it's less surprising than you might think that the PhD took eight years and absolutely shattered my confidence.
And the best part is that it was just about impossible to predict at the time that shit would go quite this bad, except that some people handle power well when they're stressed and some people maintain a strong layer of cognitive dissonance over their knowledge of power such that it's never real enough to be responsible about but always real enough to win a dispute.
Anyway I think every student should have two advisors so that everyone in the department should have to immediately know about it when a PI is floundering and have a strong direct incentive to do something about it. A LOT of my problems could have been fixed with one look with a gimlet eye from a senior, more experienced researcher being not impressed at a student under their supervision running on an endless treadmill to nothing. Frankly a lot of my problems could have been solved if my mentor had formal training or literally any supervision that could deliver metrics faster than "how close am I to my previous mentees?"
I know a lot of dual advised students wind up in a tug of war between two advisors, but like: that's the point. If one of them turns out to be insane and malicious then a) the students all have clear lines to bail, b) the other ones all realize quickly that bailing out the chaos and career damage of someone who is fucking it up is way more work than resolving the problem, and c) the one with more tethers to reality has a way bigger likelihood of formally retaining the student when and if a third party has to examine the contract.
Just. It was such a fucking waste. And not because anyone necessarily wanted it to be wasteful, either, or any malice, but because I was... mm, I think the fifth PhD student in that lab and that's actually not that many to be learning on. Systems that set you up to play with decades of people's lives should have more fail-safes and places for people to learn before they get to be the sole director of someone else's career for five fucking years, not less. And yet!
31 notes
·
View notes
Text
MathWorks is announcing the "gameification" of Matlab! Collect functions in a roguelike deck builder, compete with friends to write the fastest code, and complete daily quests to unlock bonus features!
17 notes
·
View notes
Text
### **Title: Ek Nakli Rishte Ki Asli Kahani**
#### **Introduction:**
Aslam, a 28-year-old fashion designer, had moved from Delhi to Mumbai for a job at a lingerie company. He had been living in Mumbai for 2-3 years, staying alone in a small 1RK apartment on rent. Meanwhile, his younger sister, Ishita, completed her graduation in Delhi and secured an internship at a well-known lingerie brand, Zivame, in Mumbai.
Excited about the opportunity, Ishita arrived in Mumbai and stayed in a hotel for two days. However, she soon realized that finding a rental flat as a single woman was extremely difficult. Frustrated, she called her brother, Aslam, seeking advice.
#### **The Dilemma:**
Ishita (on call): *"Bhai, yaha flat milna toh mushkil ho raha hai. Jo bhi landlord se baat karti hoon, ya toh reject kar dete hain ya weird conditions rakhte hain. Kahi-kahi toh single ladki ko room dena hi nahi chahte!"*
Aslam: *"Haan, mujhe pata hai. Mumbai me single ya bachelor logon ke liye rental milna kaafi tough hai. Kahi jagah toh sirf married couples ko hi rent dete hain."*
Ishita: *"Phir mai kya karu? Internship chhodkar wapas Delhi aa jaau?"*
Aslam: *"Pagal ho kya? Itni achhi opportunity mil rahi hai. Ek kaam ho sakta hai…"*
Ishita: *"Kya?"*
Aslam: *"Yahi ki tujhe mere saath rehna padega, lekin ek condition ke saath."*
Ishita: *"Kaisi condition?"*
Aslam: *"Building wale agar puchenge toh tujhe meri biwi banke rahna hoga."*
Ishita (shocked): *"Kya?? Bhai, ye toh ajeeb lagta hai!"*
Aslam: *"Mujhe bhi ajeeb lag raha hai, par ye ek hi option hai. Isse na sirf tera rental ka problem solve ho jayega, balki main bhi tujhe safe rakh paunga."*
#### **The New Life Begins**
Mann mar kar, Ishita ne yeh plan maan liya. Aslam ne society me introduce karaya ki yeh uski biwi hai jo abhi-abhi Mumbai aayi hai. Society wale bhi is rishte ko normal maan kar accept karne lage.
Pehle toh Ishita aur Aslam alag-alag behave karte the, lekin dheere-dheere dono ek dusre ke habits aur lifestyle ko samajhne lage.
Ek din colony me Karva Chauth ka function rakha gaya.
Society Aunty: *"Ishita beta, tumne Karva Chauth ka vrat rakha na?"*
Ishita (hesitant): *"Uh… haan… rakha hai."*
Aslam (whispering to Ishita): *"Tune vrat rakha?"*
Ishita (softly): *"Aunty ke saamne mana kar bhi nahi sakti thi."*
Shaam ko building ke terrace par sab auratein chand ka intezar kar rahi thi. Ishita bhi society ki ladies ke saath thi. Sabne apne pati ke liye vrat rakha tha. Chand nikalte hi ek aurat boli, *"Ishita beta, jaldi aao! Pati ka pooja karo!"*
Ishita ne Aslam ki taraf dekha. Wo thoda confuse thi, par bina kuch kahe usne pooja ki, aur ek doosre ki aankhon me dekh kar bina bole ek ajeeb si feeling mehsoos ki.
Us raat jab dono ghar aaye, toh ek ajeeb si chuppi thi.
Aslam: *"Pata hai Ishita, aaj tujhe iss tarah dekhkar laga ki shayad hum sach me ek couple hote toh?"*
Ishita (blushing): *"Bhai… mera matlab… Aslam, ye sab nafrat aur mohabbat ke beech ka ek ajeeb rishte jaisa lagta hai."*
Dono muskura diye. Dheere-dheere ye jhooti shaadi ek asli jazbaat me badalne lagi. Kya ye rishta sirf ek compromise tha, ya phir ek sachcha pyaar? Ye waqt ke saath pata chalega…
#### **To Be Continued…**


7 notes
·
View notes
Text

february 1st, 2024
one thing i was hoping to learn during my post-bac but never really got around to was spike sorting. in my neural engineering class, i'm finally learning how to do that!
although i don't plan on collecting neural data at this level, i do hope to collect LFPs as part of my research so learning this signal processing in general is going to be extremely helpful. so far, i've determined my threshold and plotted the threshold line within the data. the hard part is everything that comes next of template matching, principal component analysis (PCA), and all the like. after not really using MATLAB in yeeears, this has been an adventure but i'm surprised at how much i've been able to recall and proud of myself for having no shame in googling MATLAB functions lol. i know i can figure this out, i'm smart(ish).
this hw is due feb 7th (with possibility of an extension if other people in the class take a while) so time to get her done. ft my pupper knocked out on the floor
#alexistudies#alexi's phd year 1#studyblr#matlab#biomedical engineering#engblr#gradblr#phdblr#phd life#grad student#study aesthetic#studyspo#genspen#hey gen#morningkou#stemblr#scienceblr#collegeblr#uniblr#study blog#study motivation#student life#studying#learning#learnign#elkstudies#studyingchemeng#selkiestudies
48 notes
·
View notes
Note
Yo I actually need some help with matlab and systems and control lol. Particularly with getting transfer function from signal flow/block diagrams. Also a little about state space. I would love to get to know a different approach or perspective coz I'm a lot bad at these atm. Lmk if you are free lol
oh my god yes these were sort of the bane of my existence but i took this class last year and i could pull up all my old assignments/answer keys/notes to help you out!!! dm me and we can start talking about it 🥰 i actually really enjoyed transfer functions and block diagrams and SS once i understood it hahaha
8 notes
·
View notes
Text
eye() being the identity matrix command in MATLAB feels so cursed. That’s a name I would come up with at 3 am when I can’t think of a proper way to name a function. Why is that in production
34 notes
·
View notes
Text
Having done over 100 hours coding in MatLab, I am left to conclude that the Absolute Solver virus was the result of someone coding in a reboot function and then forgetting to reset workspace variables after the function runs.
20 notes
·
View notes
Text
Sometimes the way a language is designed baffles me in the way it doesn't support what feel like very obvious use cases.
I'm figuring out Asymptote because I hate tikz[1] and the diagrams I want to make for this paper are beyond what I can easily whip up in matplotlib or matlab or whatever else. Asymptote has a path data structure that is essentially a collection of nodes + info on how to connect them. So, for example,
draw((0,0)..(1,1)..(2,4))
Would draw an approximation of a quadratic via some bezier curve that connects those nodes. A nice feature is that I can connect one path to another path, so I can build the above in a for loop:
path curve; for(int x = 0; x<3; x++) curve = curve..(x,x*x); draw(curve);
Which works nicely, I can neatly calculate path nodes and concatenate them onto the path. This often screws up, though, since the default bezier curve for those points may not match well the actual curve I'm trying to draw. I can calculate a lot more points to get a better approximation, but I can also tell Asymptote what the tangent at those points is. Doing the whole curve at once, I can write:
draw((0,0){(1,0)}..(1,1){(1,2)}..{(1,4)}(2,4))
But that gets irritating fast so I'd definitely want to just loop it:
path curve; for(int x = 0; x<3; x++){ curve = curve..(x,x*x){(x,2*x)}; } draw(curve);
Except this fails! It fails for two reasons: the first is that you cannot specify the right-side derivative of the final point. Because it doesn't connect to anything in that direction, specifying the derivative on that side does nothing. That's why I have to specify the tangent on the left side of the final point in the non-looped example.
This is whatever, it makes sense, I have to treat end points in a special way, not unheard of. I can work with that, but it'd be nice if I didn't have to.
The part I find baffling is actually in the first loop iteration, which is equivalent to
curve = (0,0){(1,0)}
At this point there is only one node on the path, and the tangent specified to the right of rightmost node does nothing. What's baffling is that the path is not evaluated in a lazy fashion i.e. it's not evaluated when it comes time to draw the curve. It seems to be evaluated immediately, it notices that the tangent does nothing, and simply removes it.
But why? Why would you design it that way? All that does is create more boilerplate for me, since now I can't start my curves as empty or even as a single node: I have to start every curve with two points if I want to specify the derivative for each point. That sucks! That's ugly! Add that to the fact that I have to specify the left side tangent on the right endpoint and the code just becomes irritatingly ugly if I want it to behave as it should.
That also means I can't compute the path segments individually and store them in a single list because if I do that then every tangent gets erased. This is what happens if I try doing that with sqrt(x) (in red is the true function):
I computed the proper tangent for each point! But the path segments were immediately evaluated, and the tangents discarded. If I specify everything properly:
This isn't insurmountable by any means, but I'm irritated that it took me 15 minutes to figure out why my tangent at 0 is always wrong, and doubly irritated that, though doable, every other way of doing this is just uglier.
1: I don't really hate tikz, I just find it deeply unwieldy for anything but simple diagrams.
3 notes
·
View notes