필터 지우기
필터 지우기

If i has supply=0.2x + 20 and p=RandData(1,:) is there a way to substitute p in for x?

조회 수: 2 (최근 30일)
If i has supply=0.2x + 20 and p=RandData(1,:) is there a way to substitute p in for x?
  댓글 수: 5

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

답변 (1개)

Samatha Aleti
Samatha Aleti 2020년 5월 3일
Hi,
If you have to define “supply” in terms of “x” initially then you can substitute “p” in place of “x” by using syms” as follows:
syms x
supply=0.2*x + 20 ;
p=RandData(1,:); % As per your code
out = subs(supply, p);
clear x;
Otherwise you can define “p" and then define "supply" in terms of "p" as follows:
p=RandData(1,:);
supply=0.2*p + 20 ;

카테고리

Help CenterFile Exchange에서 Formula Manipulation and Simplification에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by