Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

symbolic matrix in matlab

Status
Not open for further replies.

wave85

Member level 1
Joined
Apr 21, 2009
Messages
34
Helped
5
Reputation
10
Reaction score
3
Trophy points
1,288
Location
Iran
Activity points
1,461
Hi every body. I want to generate a 20*20 symbolic matrix in MATLAB. I am wondering how I could do that. I searched the net, and I found this command : A=sym('A',[20 20])
but whenever I typed this command in my MATLAB program, it sends error to me. Is anybody to help me?

Thanks a lot
 

Thank u so much
I think my MATLAB software has a problem with sym syntax!!
I type :
A = sym('A%d%d', [3 4])

but I have following error:

??? Error using ==> sym.sym>char2sym at 408
Not a valid symbolic expression.

Error in ==> sym.sym at 92
S = char2sym(x);
 

Maybe you don't have the symbolic toolbox -- I don't think this is a standard part of the matlab distribution.
There is an additional cost to this toolbox. If you are looking for symbolic mathematical tools, there are free
options out there. One of them is Maxima Maxima, a Computer Algebra System
Check it out ... it does a lot of things very well and it is free!
 
  • Like
Reactions: wave85

    wave85

    Points: 2
    Helpful Answer Positive Rating
It can easily be done y using loop.

Code:
function a=fu()

for i=1:20
for j=1:20
a(i,j)=sym(strcat('a',num2str(i),num2str(j)));
end
end
end
 
  • Like
Reactions: wave85

    wave85

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top