photo

Mostafa


Active since 2016

Followers: 0   Following: 0

Statistics

All
  • Knowledgeable Level 2
  • First Answer
  • Commenter
  • Promoter
  • Solver

View badges

Feeds

View by

Answered
Normalize from -1 to 1... help me
%dataSet = your data min_L = -1; max_L = 1; dataSet = dataSet/norm(dataSet, Inf); %Normalize between 0 and 1 dataS...

8 years ago | 0

Answered
Cell array in a loop
% B is already defined, a matrix of doubles % A is already defined, a cell array of matrices % B and the matrices in A h...

8 years ago | 0

Answered
Import data from text file in awkward format
This is neither the fastest, nor the most elegant solution, but it works. %Read File fid = fopen('example.txt','rt'); ...

8 years ago | 0

| accepted

Answered
While loop going one too far
Ah, the good old "Hard equality" problem.. Simply put, (i<2) doesn't return false, since (i) is not actually equal to (2) ! ...

8 years ago | 0

Answered
Error with transfer function?
Aside from posting your model to actually identify the problem, possible solutions could be: 1) Initialize your blocks (Inte...

8 years ago | 0

| accepted

Answered
Import of mixed string and numerical data from excel file
I believe that the easiest (not the fastest) way is to import all the data at once in matlab environment then process it there. ...

8 years ago | 0

| accepted

Answered
Problem with loop to construct graph
%Reading the data from sheet 1, cells B2 to D8 dataMat = xlsread('Book1.xlsx', 1, 'B2:D8', 'basic'); %Get sum of numbers...

8 years ago | 0

| accepted

Answered
How to skip (iteration) empty folders and empty text files
%Get list of all files in current directory and beneath [~,list] = system('dir /S *.txt'); result = textscan(list, '%s',...

8 years ago | 0

| accepted

Answered
How to remove the MATLAB logo when masking a MATLAB Function block in Simulink?
Right Click on the Matlab function block -> Mask -> Edit Mask In the 'Icon drawing commands' write disp('MyFunc') Pre...

8 years ago | 0

Answered
Dear Sirs, how to get points that are in minimum distance from a curve, that was plotted using 100 points, with respect to points of other curve.
Assuming the two arrays are of the same size: values = 0 : pi/100 : 2*pi; A = cos(values); B = sin(values); min_di...

8 years ago | 0

Answered
Where is my mistake in trying to write a cell array with both strings and numbers to XLS file?
You can't pass data of "cell" class to an xls file, so you need to convert all data to strings. Either cast _char(data)_ or ...

8 years ago | 1

Answered
Compute different length mean when cell equals number
Arr1 = [23, 23, 24, 25, 25, 25, 26, 26, 27, 27, 27, 27]; Arr2 = [42, 43, 44, 38, 35, 36, 32, 28, 45, 46, 38, 29]; uniA...

8 years ago | 1

| accepted

Answered
Load .mat file
Try this: A = textscan(fid, '%s', 'Delimiter', ' '); impData = A{1}; %%This cell contains your data impData = impData (3...

8 years ago | 0

| accepted