Solved


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

10 years ago

Solved


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

10 years ago

Answered
Is it possible to insert in a legend a calculated variable?
for eg: z = 1; %loop1 data1 = [1:10];% data obtained in loop1 z = 2.5; %loop2 data2 = [1:2.5:25];% d...

10 years ago | 4

| accepted

Answered
How can i save after each loop the variable in the same vector?
Hi Chris. Its better to maintain a vector of the results instead of writing into a text file and again loading it. If you want ...

10 years ago | 0

| accepted

Answered
How can i import data from ms access in matlab
Try this link. <http://www.mathworks.com/matlabcentral/answers/6471 Interface with MS Access> <http://www.mathworks.in/matlab...

10 years ago | 0

Answered
how to set the stop time in the scope of simulink
Hi Stanley, Have you tried un-checking the history option in the scope.PFA image <</matlabcentral/answers/uploaded_files/111...

10 years ago | 0

Answered
Create matrix 64x64 using Matlab Simulink
Hi Maximum,, the error is .. input signal to reshape is a signal of [61 x 1] where as the reshape block needs a matrix of [4096...

10 years ago | 0

| accepted

Answered
Simulink function block to multiply a signal with -1 if its negative
find the attached logic <</matlabcentral/answers/uploaded_files/10866/simulinklogic.png>>

10 years ago | 0

| accepted

Answered
search in data structure type
<http://www.mathworks.in/matlabcentral/fileexchange/29808-structfind Struct Find> I hope this will help you.

10 years ago | 1

Answered
how to get the length of text in matlab?
str = 'sandy sorathiya ' len = length(str);%length of the string

10 years ago | 1

Answered
How can I use variable of one M-file into other M-file ?
you can make functions and pass as arguments or u can declare them as global.

10 years ago | 0

Answered
is it possible to make a dialog box from excel file?
yes... [~,str1] = xlsread('xlsname.xls','SheetNam','A1:B1'); msgbox(char(str1)))

10 years ago | 0

Answered
copy pasting rows of a file to columns of other file
clear all; clc; fp1 = fopen('f1.ap','r'); i = 1; while(~feof(fp1)) mat{i,:}= fgetl(fp1); i = i+1; ...

10 years ago | 0

| accepted

Answered
what is the difference between ert.tlc model and idelink_ert.tlc model?
<http://www.mathworks.in/products/embedded-coder/description3.html Selecting Targets>

10 years ago | 0

Answered
increment values which are larger than three
a = find(A>3); A(a) = A(a)+1;

10 years ago | 1

Answered
cell2mat not working when cell array of type char has numbers of different lengths
In the second case the B{1} has 12 characters where as B{2} has only 11 characters . this is making an inconsistent matrix when ...

10 years ago | 0

Solved


Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

10 years ago

Solved


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

10 years ago

Answered
initialize set of sequence variables in a loop
Ti = [1:5]; is this what you are looking for?

10 years ago | 1

Answered
call a function within another function
I guess you want to have two function within same m file. function fun_one() fun_two();%this is another function ...

10 years ago | 0

Solved


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

10 years ago

Solved


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

10 years ago

Answered
operation using *.m file
make hthresh.m and sthresh.m as function files function val1 = hthresh() function val2 = sthresh() and us...

10 years ago | 0

| accepted

Answered
Simulink display block as stateflow output
Display block can be used only to see the latest output.but if you want to see how the output varies over a period of time then ...

10 years ago | 0

Solved


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

10 years ago

Solved


Return area of square
Side of square=input=a Area=output=b

10 years ago

Solved


Find max
Find the maximum value of a given vector or matrix.

10 years ago

Solved


Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.

10 years ago

Solved


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

10 years ago

Solved


Determine Whether an array is empty
Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

10 years ago

Load more