Answered
simulink model giving error: the diagram must contain a power gui block
Have you read the <http://www.mathworks.com/help/physmod/sps/powersys/ref/powergui.html help> ?

11 years ago | 0

| accepted

Answered
Intersect 2 arrays to find a position
hour=[8 8 8 9 9 9] Minute=[15 30 45 15 30 45] V=[10 6 5 4 3 11] s='8.45' ii=cellfun(@str2num,strsplit(s,'.')) id=find(hou...

11 years ago | 0

| accepted

Answered
Grouping elements in an array?
v=struct('Altitude',num2cell(1:46),'Velocity',num2cell(randi(9,1,46))) ii=0; m=numel(v) for k=1:7:46 ii=ii+1 k1=k...

11 years ago | 0

Answered
how i cab convert numbers into letters
numbers12 ={3,6,12,1,1,3,26,20} lettter=cellfun(@num2str,numbers12,'un',0)

11 years ago | 0

| accepted

Answered
Replacing Matrix Cells with Date Values
d={'01/04/2004' '02/04/2004' '03/04/2004' '04/04/2004' '05/04/2004' '06/04/2004' '07/04/2004'} v=num2cell(r...

11 years ago | 1

| accepted

Answered
How can i create the below Matrix most elegantly using two for loops.
reshape(1:21,7,[])

11 years ago | 0

Answered
How to access workspace variables one by one using m-script
a = 1; b=2; c=3; d=4; s1=whos out=cellfun(@iskeyword,{s1.name})

11 years ago | 0

Answered
how to make a function that return smallest unsigned integer class of a matrix
If you want to test the class, use if strcmp(class(A),'uint8')

11 years ago | 0

Answered
"Partial" matrix multiplication
A=randi(9,3,9) B=randi(9,3,9) idx=1:3:size(A,2) out=cell2mat(arrayfun(@(x) A(:,x:x+2)*B(:,x:x+2)',idx,'un',0))

11 years ago | 0

| accepted

Answered
precision problem in simple subtraction?!?
<http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F>

11 years ago | 0

| accepted

Answered
Is there a difference between plot(x,y,'x') and scatter(x,y,'x')?
Like you can see the result is the same, but the two functions plot and scatter are different

11 years ago | 0

| accepted

Answered
How do I find the duration of a number in an array?
c=[3 3 3 5 5 6 7 8 1 1 3 3 3 0 0 0 4 4 4 5 6 7 8 3 3 3 9 10 3]; [ii,jj,kk]=unique(c) d=accumarray(kk,1) for k=1:numel(ii) ...

11 years ago | 0

Answered
State space without using the control toolbox - Error using + Matrix dimensions must agree.
The matrix A is 2x2 then x should be 2x1 not 3x1

11 years ago | 0

Answered
How to read non-signal .mat data in Simulink Function Block
<http://www.mathworks.com/help/simulink/ug/matlab-function-block-editor.html#bqlblru Adding Data to a MATLAB Function Block>

11 years ago | 0

Answered
How to calculate the frequency of a binary event (0 or 1) on a weekday basis over the last 10 years?
n=20 a=randi([0 1],n,1) b={'monday';'tuesday';'Wednesday';'Thursday';'friday'} w=b(randi(5,n,1)) v=[num2cell(a) w] [ii1,...

11 years ago | 0

Answered
Create arrays from single array indexes
out=arrayfun(@(x) A(x):A(x+1),1:numel(A)/2,'un',0) But this is not faster then a for loop

11 years ago | 0

Answered
How to declare global variables for simulink containing matlab functions?
<http://www.mathworks.com/help/simulink/ug/matlab-function-block-editor.html#bqlblru Adding Data to a MATLAB Function Block>

11 years ago | 0

Answered
Why do I get different value for pole placement function?
Your code is not correct gamma=[0;0.9948*10^(-4)] phi=[1 0.0001;-0.0503 0.9896] e=[0 1]*inv([gamma fi*gamma]) p1=0.3 + 0...

11 years ago | 0

| accepted

Answered
Use a simulink signal during simulation
What is your exact problem, just connect your signal to your observer. It' s the same signal connected to the workspace block

11 years ago | 0

Answered
Error using imread (line 349) ; File "..." does not exist
Check if the file 20051020_43808_0100_PP exist in the specified directory. you should precise its extension.

11 years ago | 0

| accepted

Answered
converting a 3d data into 2d
if a is your array out=a(:)' You can also use reshape for more general cases

11 years ago | 1

| accepted

Answered
How to make a string == one string in a cell array
x = input('+ ', 's'); s={'hey','hi','hello'}; if ismember(x,s) disp('Hello') end

11 years ago | 0

| accepted

Answered
Changing the size and position of the simulink block
set_param('Model_Name/Block_Name','Position',[50 50 200 100])

11 years ago | 1

| accepted

Answered
How do i display the binary matrix of an image in the command window?
you can use <http://www.mathworks.com/help/images/ref/im2bw.html im2bw> function

11 years ago | 0

Answered
if i have number as index, and 300 character how i can find the chacter of these indexs
a='abcdefg' id=[1 3 5] out=a(id)

11 years ago | 0

| accepted

Answered
error in embedded matlab function
Some function are not supported for c code generation. You can tell Matlab that you do not need code generation for those functi...

11 years ago | 0

Answered
how to convert string to array?
a=1234 b=num2str(a)-'0'

11 years ago | 1

Answered
How can I implement this formula in simulink?
You can use <http://www.mathworks.com/help/simulink/slref/matlabfunction.html Matlab function block>

11 years ago | 0

Answered
changing the cell values into normal columns
Data={'020';'1014';,'000'} idx=~strcmp(Data,'1014') ix=~idx out=cell(numel(Data),3) out(idx,1)=cellfun(@(x) x(1),Data(idx)...

11 years ago | 0

Answered
how to save a zone of figure as picture
Use imrect to select a rectangle in your image, and get its position, then create a new image and save it

11 years ago | 0

Load more