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 ...

8 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...

8 years ago

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...

8 years ago | 4

| accepted

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 ...

8 years ago | 0

| accepted

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...

8 years ago | 0

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...

8 years ago | 0

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...

8 years ago | 0

| accepted

Simulink function block to multiply a signal with -1 if its negative

8 years ago | 0

| accepted

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

8 years ago | 1

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

8 years ago | 1

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.

8 years ago | 0

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

8 years ago | 0

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; ...

8 years ago | 0

| accepted

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

8 years ago | 0

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

8 years ago | 1

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 ...

8 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...

8 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...

8 years ago

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

8 years ago | 1

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 ...

8 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....

8 years ago

Solved

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

8 years ago

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

8 years ago | 0

| accepted

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 ...

8 years ago | 0

Solved

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

8 years ago

Solved

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

8 years ago

Solved

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

8 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.

8 years ago

Solved