photo

Amir Xz


Last seen: 3 years ago Active since 2018

Followers: 0   Following: 0

Statistics

  • Knowledgeable Level 2
  • First Answer
  • Thankful Level 1

View badges

Feeds

View by

Answered
Vectorized method to sum missed one values
A=[0, 1, 1, 0, 0, 1, 0, 1]; [~,NonZr] = find(A~=0); A(NonZr) = [NonZr(1),NonZr(2:end)-NonZr(1:end-1)]; Result: A...

6 years ago | 1

| accepted

Answered
How to make a polar plot function curve and not rigid?
Steps are so large. theta = 0*pi: 0.01: 2*pi;

6 years ago | 1

Answered
Rotate image parallel to the x-axis
A = [50 70]; %[x y] & x,y: pixel number B = [100 30]; %[x y] % find point2 (point with larger x) if A(1)>B(1) P2 ...

6 years ago | 1

| accepted

Answered
Calculate values only once in the loop
Use "isempty": I = rand(4,5);r=[]; c=[]; for i=1:10 if isempty(r) || isempty(c) [r,c]=size(I); en...

6 years ago | 0

Answered
how to make a square wave as input of transfer function in MATLAB ?
h=2;TimeEnd=20; % inputs t=0:0.01:TimeEnd; x=h/2:2*h:t(end); n=length(x); win=h*rectpuls(t-x(1),h); for i=2:n ...

6 years ago | 0

Answered
How to modify the input function to a system?
1. Left Shift: xn(end+1:end+3)=xn(1:3); xn(1:3)=[]; 2. New signal: y = 3*xn + 5*xn(5)^2;

6 years ago | 0

Answered
Difference between graythresh and multithresh for one value of threshold.
t1 = multithresh(I,1); t2 = graythresh(I); t1 is a LEVEL, which means is a number between 0 to 255. t2 is same LEVEL th...

6 years ago | 0

Answered
How to add a large number of cell.
MatA = cell2mat(A); ArrayA = reshape(MatA',1,12*10^8);

6 years ago | 0

| accepted

Answered
Please how can I store values of variable size vectors inside a loop for
" *x( idxX(k) + 1 : idxX((k+1)) )*" is a vector, so it should store in a vector too. Use this one: subH(k,:) = x(...

6 years ago | 1

| accepted

Answered
Dear matlab users after I write m file script and run ,it work correctly but when I try open for additional work ,I got different characters .How can open it ? Thank you.
Did you use "clear" at the first line of your code? Or, another probability is: You added a folder into MATLAB path,that you ...

6 years ago | 0

Question


Getting output from Simulink using m-file (link for m-file in simulink)
Hi, I wanna create a link in Simulink, something like a link that exist in "ssc_engine_cooling_system". See image below: <</...

6 years ago | 1 answer | 0

1

answer