MATLAB Answers

0

How to put input of functions as an Array of elements

Asked by Michael Kurniawan on 16 Oct 2012
hi I just wanted to know if I had a function
fuction [random]= S(x,y) and I want the input x and y to be an array elements how would I do this?
so for example the input in matlab should be S([2,3],[2,2,3,3,3]) what i tried
function [ Vdrop ] = ecircuit(V,R)
V = [v1 v2];
R = [r1 r2 r3 r3 r5];

  0 Comments

Sign in to comment.

1 Answer

Answer by manoj saini on 16 Oct 2012

you are going right.... but you have to explain possible operation inside the function i.e. you have taken V & R two row vector, you can any valid operation on these matrix......

  1 Comment

Sorry I dont really understand what you mean by "you can any valid operation on these matrix"

Sign in to comment.