How to put input of functions as an Array of elements
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
manoj saini
2012-10-16
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......
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!