MATLAB Solutions & Expert Answers

Ask an expert. Trust the answer.
Academic and engineering questions answered by verified MATLAB professionals.

MATLAB expert answering student questions
Showing page 41 of 208 Ask a Question
Is it possible to vectorize for only one input?
sykim14 · Mar 18, 2023 · matlab function , vectorization , Loops and Conditional Statements

Suppose there are two variables.   v1 = [1 2 3]; m1 = [1 2 3; 4 5 6]; I hope to create another matrix m2, having the same size with m1, and its (i, j) component is defined by m2(i…

match time stamps index
michael scheinfeild · Mar 18, 2023 · time , matching , Mathematics , Linear Algebra

hi i have two vectors diffrent lengths with diffrent values i want to match closest index in one vector to other   example :   v1 = [1610759986514 1610759986549 1610759986583 161…

Fastest way to find closest value in a vector
Patrik Ek · Mar 18, 2023 · large vectors , large arrays , fastest

Hi,   I have a serious issue in matlab. I have 2 vectors v1 and v2 and length(v1) = 1376872, length(v2) = 1350228. Vector v2 contains information about position in the original co…

fast and beautiful way to convert vector ranges to indexes
Vincent · Mar 18, 2023 · indexing , Creating and Concatenating Matrices , Language Fundamentals

Hi there,   my question could easily be solved with a simple loop but I'm curious if there is a nice genuine matlab way of doing this: I have a vector "v1" containing 10 entries. …

how to create this matrix?
diadalina · Mar 17, 2023 · matrix , Numeric Types , Logical , Data Types

can anyone help me to construct this matrix     blj=(-2)^j-l if lj  …

Why is my own echelon function printing incorrect matrix
Murawski · Mar 17, 2023 · echelon , MATLAB , Mathematics

I am trying to create an echelon function, however, I am having trouble debugging my error. It works for almost all matrices but for the following matrix it gives an incorrect resu…

How to get numbers as answers? Values show NaN
Eric Lee · Mar 17, 2023 · gauss-jordan , rref , nan , MATLAB , Programming

My function file my_rref.m is as follows:   function my_rref(A) [m,n]=size(A); for i=1:m-1 for j=i+1:m if abs(A(j,i))>abs(A(i,i)) t=A(j,:); A(j,:)=A(i,:); A(i,:)=t; end end end fo…

Drawing rectangles around binary image objects from region props
Adrian Lim · Mar 16, 2023 · image processing , Image Processing and Computer Vision , Image Processing Toolbox

Hi, from the binary image above, I've tried drawing boundaries around the object and successfully counted them. But I'm thinking of trying another method which is to use the region…

Change component size in system composer
Aidin Esmkhani · Mar 16, 2023 · matlab , system composer , Speechdemo in GUI using unofficial Google

How can I change a component size in MATLAB system composer by means of APIs (command line or MATLAB code) ?…

Get a Free Consultation or a Sample Assignment Review!