我在Maxima中有一个矩阵,可以说(为简化问题):
A:矩阵([2 *(a ^ 2 + b ^ 2 + c ^ 2)])
但是我知道:
a ^ 2 + b ^ 2 + c ^ 2 = 1
为了获得A = [2],如何根据该方程式简化Maxima中的矩阵?
答案 0 :(得分:0)
我找到了解决方法:
A: matrix([2*(a^2+b^2+c^2)]);
eq: a^2+b^2+c^2 = 1;
scsimp(A, eq);
答案 1 :(得分:0)
您可以使用Command
。
package loopturn.loanbot.main;
import net.dv8tion.jda.api.events.message.guild.GuildMessageReceivedEvent;
import net.dv8tion.jda.api.hooks.ListenerAdapter;
public class Command extends ListenerAdapter implements CommandInterface {
private String command;
private CommandExecutor executor;
public Command(String command, CommandExecutor executor) {
this.command = command;
this.executor = executor;
}
public Boolean onCommand() {
return null;
}
public void onGuildMessageReceived(GuildMessageReceivedEvent event) {
String[] messageSplitBySpace = event.getMessage().getContentRaw().split(" ");
if(messageSplitBySpace[0].startsWith("!")) {
if(messageSplitBySpace[0].equalsIgnoreCase("!" + command)) {
executor.onCall(event);
}
}
}
}