How to put input of functions as an Array of elements

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

답변 (1개)

manoj saini
manoj saini 2012년 10월 16일

0 개 추천

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

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

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

질문:

2012년 10월 16일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by