필터 지우기
필터 지우기

How to assign design variables?

조회 수: 2 (최근 30일)
Danishtah Quamar
Danishtah Quamar 2022년 3월 2일
답변: Walter Roberson 2022년 3월 7일
How to assign design variable in matlab coding and call it in mathematical function .
Example:- I have to make a function with variables x and x containing design variable a,b,c,d
And I have to call it in equation in the same function in a way
sigma = 5.04e5./(x(:,3).^2.*x(:,4));
then how to do it.
  댓글 수: 2
Jan
Jan 2022년 3월 2일
What are "design variables a,b,c,d"? Do you mean symbolic variables?
Danishtah Quamar
Danishtah Quamar 2022년 3월 7일
Yes x(1)=a % length
x(2)=b % width
and so on

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

답변 (1개)

Walter Roberson
Walter Roberson 2022년 3월 7일
See matlabFunction option 'vars' with the {} approach
matlabFunction(EXPRESSION, 'vars', {[a, b, c, d] })

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by